[exim] Domain Aliases

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jonathan Gilpin
Ημερομηνία:  
Προς: exim users
Αντικείμενο: [exim] Domain Aliases
Hi,

I would like to implement a domain alias... and I've been looking
around at examples...

Such as this one:

virtual_domain_alias:
   driver = redirect
   allow_fail
   data = ${lookup mysql{select concat('${quote_mysql:$local_part}@',  
domain) \
                 from domains,domainalias where domainalias.alias = '$ 
{quote_mysql:$domain}' \
                 and domainalias.domain_id = domains.domain_id}}
   retry_use_local_part


The problem with this and with my other method which was to have an
alias for

*@domain.com to a user ...

mysql_aliases:
driver = redirect
file_transport = address_file
pipe_transport = address_pipe
data = ${lookup mysql{SELECT destination FROM aliases,emailtable
WHERE emailtable.email = aliases.destination and (aliases.address = '$
{quote_mysql:$local_part}@${quote_mysql:$domain}' or aliases.address =
'*@${quote_mysql:$domain}')}}

.. is that when the mail is written to the Maildir the Envelope-To: is
re-written as the redirect address and not the original address
emailed to.

I'm delivering emails via SMTP using a script which extracts messages
from a maildir folder and then delivers them using SMTP to an IP
address.

Can anyone help me put together a method which would allow me to
achieve this without having multiple entries in my emailtable, one for
each domain name a customer may have?


Kind Regards,

Jonathan Gilpin