LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 02-03-2011, 04:55 AM   #1
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Rep: Reputation: 0
Sendmail Email Aliases not accepting mail


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.

Code:
makemap -v hash ./virtusertable.db < ./virtusertable
Output of sendmail -bv is as follows and looks correct.

Code:
[root@HLLCBlueCapServer ~]# sendmail -bv admin@sigfin.co.uk
admin@sigfin.co.uk... deliverable: mailer local, user admin
[root@HLLCBlueCapServer ~]#
Have also added new domain into local-host-names file. I am stuck on what is left to check and why the messages are getting bounced back.
 
Old 02-03-2011, 05:38 AM   #2
goossen
Member
 
Registered: May 2006
Location: Bayern, Germany
Distribution: Many
Posts: 224

Rep: Reputation: 41
For my experience, you should add the alias in "/etc/aliases" and then run the "newaliases" command.
 
Old 02-03-2011, 06:08 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Quote:
I have tried restarting sendmail, have mapped the /etc/mail/virtusertable across to virtusertable.db with the following command.

Code:

makemap -v hash ./virtusertable.db < ./virtusertable
Assuming you're in /etc/mail directory, you should use:
Code:
makemap -v hash virtusertable < virtusertable
If it still doesn't work post etc/mail/virtusertable

Regards

Last edited by bathory; 02-03-2011 at 06:09 AM.
 
1 members found this post helpful.
Old 02-03-2011, 07:37 AM   #4
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
goossen, what would I need to add into /etc/aliases. Would it be the same as I have added to virtusertable (posted below).

bathory, have tried the makemap command you posted and still no luck unfortunately. Below is virtusertable file.


Code:
admin@sigmared.co.uk            admin
admin@sigfin.co.uk              admin
Thanks both for your assistance.
 
Old 02-03-2011, 08:21 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
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

Regards
 
1 members found this post helpful.
Old 02-03-2011, 09:14 AM   #6
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
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.

Code:
Reporting-MTA: dns; XX.XXXnyms-it.co.uk
X-Postfix-Queue-ID: 357C11C49103
X-Postfix-Sender: rfc822; AaronH@Tharion.com
Arrival-Date: Thu,  3 Feb 2011 13:30:08 +0000 (GMT)

Final-Recipient: rfc822; admin@sigfin.co.uk
Original-Recipient: rfc822;admin@sigfin.co.uk
Action: failed
Status: 5.1.1
Remote-MTA: dns; 87.84.XXX.XX
Diagnostic-Code: smtp; 550 5.1.1 User unknown
 
Old 02-03-2011, 11:51 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
If you don't see any errors in maillog, then the mail is going to some other mailserver and not your sendmail!
What does:
Code:
dig mx sigfin.co.uk
show from the box you're trying to send the mail
Also note that there is no MX for sigfin.co.uk when tested from here

Regards
 
1 members found this post helpful.
Old 02-09-2011, 07:44 AM   #8
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
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.
 
Old 02-09-2011, 08:33 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Have a look at the dig output for both domains.
For the working domain:
Quote:
; <<>> DiG 9.7.3rc1 <<>> mx sigfin.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15729
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;sigfin.co.uk. IN MX

;; ANSWER SECTION:
sigfin.co.uk. 86350 IN MX 10 87.84.127.51.sigfin.co.uk.

;; AUTHORITY SECTION:
sigfin.co.uk. 86336 IN NS ns2.123-reg.co.uk.
sigfin.co.uk. 86336 IN NS ns.123-reg.co.uk.
For the not working:
Quote:
; <<>> DiG 9.7.3rc1 <<>> mx sigmared.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22168
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;sigmared.co.uk. IN MX

;; 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

Regards
 
1 members found this post helpful.
Old 02-09-2011, 09:21 AM   #10
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
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.


Thanks for your time.
 
Old 02-09-2011, 10:29 AM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
They both look OK from here now.
Maybe you need to restart that exchange server
 
Old 02-09-2011, 11:13 AM   #12
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
Have tried that and still they are stuck in the queue, I have tried sending from a completely external source as well using my personal Gmail account.

The message from Gmail has not had a bounceback but hasn't reached the server either, as is not in the maillog or the mailbox.
 
Old 02-09-2011, 01:06 PM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Quote:
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
Just saw that the A RR exists already:
Quote:
DiG 9.7.2-P3 <<>> mail.sigfin.co.uk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10257
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mail.sigfin.co.uk. IN A

;; ANSWER SECTION:
mail.sigfin.co.uk. 86400 IN A 87.84.127.51

Last edited by bathory; 03-09-2011 at 01:09 PM.
 
Old 02-09-2011, 05:54 PM   #14
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
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.

Thanks Again.
 
Old 02-10-2011, 02:04 AM   #15
manutdfan1988
LQ Newbie
 
Registered: Jan 2011
Location: Worcester, UK
Distribution: Red Hat 5.5
Posts: 28

Original Poster
Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail Not Accepting Mail videoman Linux - Networking 6 06-08-2008 12:20 AM
sendmail and NIS databases (aliases, mail.aliases) - what kind of databases? cotton213 Linux - Software 0 03-14-2006 05:57 PM
Sendmail + /etc/aliases = Unprivlieged User mail ckoniecny Linux - General 1 10-22-2005 05:41 AM
sendmail not accepting external email noisybastard Linux - Networking 6 11-04-2003 10:10 PM
sendmail & /etc/mail/aliases adam_boz Linux - Software 5 09-27-2002 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration