1

I do not have any experience with sendmail and googling around didn't help me so far.

I need to redirect every email that goes to a specific address to another address in the same domain. For example, info@domain.com should be redirected to foo.bar@domain.com, while every other mail for that domain should be directly be sent.

I have added following entry in the /etc/mail/virtusertable file:

info@domain.com info

and added an info alias, pointing to the specific mail in /etc/aliases:

info: foo.bar@domain.com

However, when I try to send a mail to info@domain.com, sendmail does not redirect the mail. I ran newaliases and make. What am I doing wrong?

Thanks in advance for your help

0

sendmail applies virtusertable to some domains.
Is the domain on list of loacl email domains ($=w) or virtual domains ($={VirtHost})?

As root execute the following test commands:

echo '$=w' | sendmail -bt
echo '$={VirtHost}' | sendmail -bt
2
  • Thanks for your reply. Both commands are yielding WARNING: local host name (ba7411d5b464) is not qualified; see cf/README: WHO AM I? ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter <ruleset> <address> – Jazzschmidt Apr 20 '16 at 11:44
  • 1) it should be lowercase w not uppercase W 2) "Who am I" documentation is available on-line at sendmail.com/sm/open_source/docs/m4/whoami.html – AnFi Apr 20 '16 at 11:57
0

Step 1) Undo what you did Step 2) In /etc/aliases append "info: foo.bar" Step 3) Run /usr/bin/newaliases Step 4) Use postfix

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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