Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to have some mail accounts on my domain (contact, webaster) redirected to my gmail account.

In order to do this I installed sendmail.

Default install (apt-get install sendmail on ubuntu server 10.04) has local daemon, and only accepts delivery to local accounts.

To forward I activated virtusertable on adding the line FEATURE(virtusertable)dnl, edited the file /etc/mail/virtusertable and added the lines:

finally, I did m4 > and make virtusertable.db, and edited the to change the daemon listenting on my external ip's interface instead of

As a result I can send email to, let's say from any host and it gets to my server's root local mail account, but on the forwarded accounts (webmaster, contact) I don't get any delivery error message but neither any forwarded mail on my gmail account, or local mail on the server like it happens with which is not forwarded using virtusertable.

I guess I would like to know what's happening (I don't even know where is the log file), and how to fix it. And also how can I change the daemon config on to allow outside connections instead of just local ones without having to edit file.

share|improve this question
up vote 0 down vote accepted

I just forgot about virtusertable and edited /etc/mail/aliases file instead, adding the lines:


then I executed newaliases and everything peachy.

Now, about proper config of the daemon to listen on and also on any other interface editing instead of I've found this:

which basically tells to simply place dnl at the front of the line which specifies the daemon options, which will make sendmail listen on all available network interfaces. e.g:

dnl DAEMON_OPTIONS('Port=smtp,Addr=, Name=MTA')

of course after doing that it's necessary to rebuild the config files (m4 /etc/mail/ > /etc/mail/ and restart sendmail.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.