[SOLVED] Sendmail Email Aliases not accepting mail
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Have tried to setup email aliases in sendmail so I can have multiple address pointing to one linux login. However none of the aliases seem to be accepting mail. I get the following error message when trying to send to them.
550 5.1.1 User unknown (in reply to RCPT TO command)
I have tried restarting sendmail, have mapped the /etc/mail/virtusertable across to virtusertable.db with the following command.
The virtusertable looks OK.
Is this user admin a regular user, or a special one? Try to replace admin with a regular user (e.g your username) and rebuild virtusertable. Note that there is no need to restart sendmail after editing and rebuilding virtusertable.
Also take a look at the bounced mail and /var/log/maillog to see if you find something strange
Admin is a standard user with no login priveleges below I have copied in contents of /etc/passwd file. I will create another user for testing purposes and try this aswell just in case.
Code:
admin:x:512:512::/home/admin:/sbin/nologin
Can't see any errors in the maillog file that show the bounceback, below is the actual log from the message that came back. Again I cannot spot anything weird looking at it myself but I hopefully you guys will.
Been a bit busy so only just had time to re-look at this, as you can probably tell I am pretty new to all this mail stuff.
The MX records are not set on either of the 2 domain that are supposed to be pointing mail at that box, the one that works I have copied the DNS settings over sigfin.co.uk.
In the DNS it has an @, mail and www records all of which look to be pointing at the correct address. I have also tried adding an MX record, but that doesn't seem to have helped either.
I am sending the mail through a MS exchange server and the error message in the queue is 'the remote computer did not respond to a connection attempt' so like you said this looks like it is sending to the wrong place.
;; AUTHORITY SECTION:
sigmared.co.uk. 10700 IN SOA ns.123-reg.co.uk. hostmaster.sigmared.co.uk. 2011012801 86400 3600 1209600 86400
So the MX record must be added in ns.123-reg.co.uk (and ns2.123-reg.co.uk) being the authoritative dns.
Quote:
In the DNS it has an @, mail and www records all of which look to be pointing at the correct address. I have also tried adding an MX record, but that doesn't seem to have helped either.
I don't know how you're trying to add the MX record, but I suspect you're using some kind of control panel. So you have to find out how to add this entry
Yeh there is a control panel through our domain hosting package.
It is actually the other way round the sigmared.co.uk is the working domain and sigfin.co.uk is the broken one.
I have added the MX record for both and now neither one accepts email, they both simply get stuck in the exchange queue with the error as my previous post and I get no log in the mailog file on the Red Hat box.
sigfin.co.uk. 86350 IN MX 10 87.84.127.51.sigfin.co.uk.
I don't know how your control panel works, but the above looks wrong. You have to define the MX record for the domain(s) and then make sure that the MX host has an A record. In terms of dns:
Code:
sigfin.co.uk MX mail.sigfin.co.uk.
mail.sigfin.co.uk. A 87.84.127.51
Aha that is possibly the issue then I put the IP in the MX records rather than a pointer.
Have updated it as you suggested so the MX record now points to mail.sigfin.co.uk and this then points at the IP through the A record.
Still doesn't look like its working but maybe the DNS changes will take a while to filter through will try again tomorrow moring to see if it has resolved.
Perfect, it is now working as expected. Aliases are both receiving mail.
Thanks for all your time and effort on this bathory it was much appreciated.
On another side note, do you know if it is possible to change the originator address in a message. Ideally mail sent from this server should look like it has originated at the server itself rather than a client PC. As it then gives out details of our local network on sent mail.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.