Thursday, July 24, 2008

Sendmail support - mailertable file

Sendmail use this file to forward mail for a domain itself as a whole to another host on the Internet or inside your network. Let say you have an internal exchange server, and the Linux server acts as a gateway on the internet, you can send all your email to the Linux server ( MX records ) and from there forward the mail internal to your exchange server.

The mailertable file can also be used to send an entire domain to one local user by doing:

domainname.com local:username

The virtusertable file can do the same as the above, by adding a line in the virtusertable file like:

@domainname.com username

The syntax to use in the mailertable file to send a domain email to another host, is done with the following example:

domainname.com smtp:[internalserver.domain.com]

That is it, again like always, send me your comments or questions so we can make this better for you !

4 comments:

Anonymous said...

Hi,

I have been trying to figure out the differences between mailertable and virtusertable, so are they actually interchangeable? Is it safe to assume that only the mailertable would allow you to select protocol?

Thanks,
Ralph

Corné Beerse said...

mailertable and virtusertable are definitly not interchangable. Only in the above mentioned case, they have a tiny overlap.

mailertable is there to map from an entire domain to a distinct destination. In the above example this is a local user. In most cases it is a remote mail server for further processing.

virtusertable is to map from a dedicated address (or an entire domain) to a dedicated address or an entire domain. The effective destination is not mentioned here.

Linux Guru said...

Well said CBee ...

Rafael Flores Vasquez said...

I having this messages: stat=Deferred: Connection timed out with mail.mydomain.edu.cl (this is a exchage server)

and I am trying from a linux server for example apache has to send a message with its user apache@mysever.mydomain.com

the mail has been sending to the outside dns mail server (mail.mydomain.edu.do). I want to know if I can make a rule that sent to internal server directly, and dont to the public dns ip.