0

I'm trying to create a catchall email address with Sendmail (it will be used to catch email bounces for Oceth's OEMPro).

First I started by creating a new user:

# useradd -s /bin/false bounces
# passwd bounces

Then I created & opened a virtusertable file with vim virtusertable and added:

bounces@sub.example.com bounces
@sub.example.com    bounces@sub.example.com

Then I added the below line to sendmail.mc near the end but before the MAILER_DEFINITIONS of with

FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl

Finally, I ran

# make
Updating databases ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/databases...
Updating auth ...
sasl2-bin not installed, not configuring sendmail support.

To enable sendmail SASL2 support at a later date, invoke "/usr/share/sendmail/update_auth"

Creating /etc/mail/relay-domains
# Optional file...
Updating Makefile ...
Reading configuration from /etc/mail/sendmail.conf.
Validating configuration.
Creating /etc/mail/Makefile...
Updating sendmail.cf ...
The following file(s) have changed:
  /etc/mail/sendmail.cf
** ** You should issue `/etc/init.d/sendmail reload` ** **
# service sendmail reload
 * Reloading Mail Transport Agent (MTA) sendmail                                                                                                                           [ OK ] 
# service sendmail restart
 * Restarting Mail Transport Agent (MTA) sendmail                                                                                                                          [ OK ]

After all this it does not seem to be working, how can I test this properly. I've tried sending an email to bounces@sub.example.com but when I look in /var/mail/ I don't see the bounces user.

# ls /var/mail/
root  www-data  other-user

I created a MX DNS record for this too, e.g. sub.example.com.

The other indication it is not working correctly is that we are getting a 504 error when we try to use this email address as our POP3 Monitoring method in Oceth's OEMPro. enter image description here

UPDATE

I tried running the below commands as root, in an attempt to debug the issue but I'm not clear what it's telling me.

root:/# sendmail -d60.5 -bv no-such-user@sub.example.com
map_lookup(dequote, other-user, %0=other-user) => NOT FOUND (0)
map_lookup(host, sub.example.com, %0=sub.example.com) => sub.example.com. (0)
no-such-user@sub.example.com... deliverable: mailer esmtp, host sub.example.com., user no-such-user@sub.example.com
root:/# sendmail -d60.5 -bv bounces@sub.example.com
map_lookup(dequote, other-user, %0=other-user) => NOT FOUND (0)
map_lookup(host, sub.example.com, %0=sub.example.com) => sub.example.com. (0)
bounces@sub.example.com... deliverable: mailer esmtp, host sub.example.com., user bounces@sub.example.com

I'm not sure why it first tries to look up another user on our system called other-user

UPDATE 2

After running # echo '$=w' | sendmail -bt I get the following result.

# echo '$=w' | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> localhost
ip-1??-??-??-??5
[1??.??.??.??5]
ip-1??-??-??-??5.ec2.internal
[127.0.0.1]
ip-172-31-31-167.eu-west-1.compute.internal

In sendmail.mc I've changed FEATURE(virtusertable', hash -o /etc/mail/virtusertable.db')dnl to FEATURE(virtusertable', hash -o /etc/mail/virtusertable.db')dnl, basically I just removed the -o flag.

Then I updated /etc/mail/local-host-names to include sub.example.com, so now it reads:

localhost
ip-17?-??-??-?67.eu-west-1.compute.internal
sub.example.com

Then I ran:

# service sendmail restart
 * Restarting Mail Transport Agent (MTA) sendmail 
# echo '$=w' | sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> localhost
ip-1??-??-??-??5
[1??.??.??.??5]
ip-1??-??-??-??5.ec2.internal
[127.0.0.1]
sub.example.com
ip-17?-??-??-?67.eu-west-1.compute.internal

After sending an email to bunces@sub.example.com I still don't see the mailbox in /var/mail/

# ls /var/mail/
root  www-data  other-user

I also still get the 504 error in the OEMPro app when I try to configure it with these settings.

  • Do not delete and repost your questions. If you are not getting answers then have more patience. Reposting the same question again and again is just generating noise. If you are adding detail to your post do so as an edit and not as a new question. – Thomas Ward Nov 28 '16 at 17:48
  • sorry Thomas, I added so much more detail I thought of it as a new question, but you're right – Holly Nov 28 '16 at 17:56

Your Answer

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

Browse other questions tagged or ask your own question.