LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   [sendmail] virtusertable not being used or not working (http://www.linuxquestions.org/questions/linux-networking-3/%5Bsendmail%5D-virtusertable-not-being-used-or-not-working-731390/)

60s TV Batman 06-08-2009 05:27 AM

[sendmail] virtusertable not being used or not working
 
Hello all

I've had a problem with virtual email addresses on one of my servers. Basically, the email address enquire@asureimage.com translates to the account enquireasi (which is /sbin/nologin).

I can send email from enquire@asureimage.com, but not receive email to it. I can, however, receive email to enquireasi@asureimage.com. This suggests virtusertable isn't being read or used.

Everything was fine until I added a new email address to virtusertable this morning, ran it through m4, and restarted sendmail.

I haven't upgraded sendmail, or made any other changes to the configuration. I only restarted it because of the change to virtusertable.

Here is a copy of virtusertable: Removed

Here is a copy of sendmail.mc: Removed

Here is the reference to virtusertable in sendmail.mc...
FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl

This is the correct address, as evidenced by entering this at the command prompt: ll /etc/mail/virtusertable.db

I restored the old virtusertable, and the problem didn't go away. After much searching, trial and error, I'm at a loss to know why I'm getting mail bounce back with this message:
=====================================================
SMTP error from remote mail server after RCPT TO:<enquire@asureimage.com>:
host asureimage.com [89.16.172.96]: 550 5.1.1 <enquire@asureimage.com>... User unknown
=====================================================

/var/log/maillog show this...
=====================================================
Jun 8 11:25:30 asureimage sendmail[26911]: STARTTLS=server, relay=uranus.***-***.com [193.***.***.29], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jun 8 11:25:30 asureimage sendmail[26911]: ***: <enquire@asureimage.com>... User unknown
Jun 8 11:25:30 asureimage sendmail[26911]: ***: from=<admin@gti7.com>, size=1757, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=uranus.***-***.com [193.***.***.29]
=====================================================

bathory 06-08-2009 08:27 AM

What is the output of:
Code:

sendmail -bv enquire@asureimage.com
sendmail -bv enquireasi@asureimage.com

To rebuild the virtusertable database you can run:
Code:

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable
Regards

60s TV Batman 06-08-2009 08:46 AM

Hi Bathory

Thanks for your help :)

Here's the salient part...

Quote:

Originally Posted by bathory (Post 3566805)
To rebuild the virtusertable database you can run:
Code:

makemap hash /etc/mail/virtusertable.db < /etc/mail/virtusertable

I'd been using m4 to rebuild virtusertable.db, as I'm...
  • Used to using it to rebuild other .db files
  • An idiot
I figured there was no point trying the 'make' solution, but then realised the problem is definitely in virtusertable.db (only thing that's changed), and that I have a history of foolishly disregarding this type of advice from experts :tisk:

Naturally, your solution worked immediately and my virtual email addresses are being directed to the underlying accounts.

Thank you very much.

Regards
Wayne


All times are GMT -5. The time now is 09:34 AM.