Red HatThis forum is for the discussion of Red Hat Linux.
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.
I know that this is a re-post. I am posting here is because none of the solutions posted earlier solved my problem (unfortunately .. ).
Below i have listed my zone files and a description of them as well.
shamly.local.zone file
PHP Code:
$TTL 604800 ; Information about "forward" domain microsys-asia.info $ORIGIN shamly.local. @ IN SOA ns1.shamly.local. webmaster.shamly.local. ( 2004042601 ; serial 86400 ; refresh 7200 ; retry 1209600 ; expiry 604800 ) ; minimum
; Define name servers for this domain IN NS ns1.shamly.local. IN MX 10 mail.shamly.local. ; short form shamly.local. IN A 192.168.1.103 ns1.shamly.local. IN A 192.168.1.109
; Define name to address mapping for this domain www.shamly.local. IN A 192.168.1.103 mail.shamly.local. IN A 192.168.1.199 *.shamly.local. IN A 192.168.1.103
; Loopback domain localhost IN A 127.0.0.1
The main domain is shamly.local which is in 192.168.1.103.
The mail server is in another machine 192.168.1.199.
Below is the reverse lookup zone file.
reverse.shamly.local.zone
PHP Code:
; Information about "inverse" domain 1.168.192.in-addr.arpa. @ IN SOA ns1.shamly.local. webmaster.shamly.local. ( 2004042601 ; serial (d. adams) 86400 ; refresh 7200 ; retry 1209600 ; expiry 604800 ) ; minimum
; Define name servers for this domain IN NS ns1.shamly.local. shamly.local. IN A 192.168.1.103 199.1.168.192.in-addr.arpa. IN A mail.shamly.local. mail.shamly.local. IN A 192.168.1.199
; Define name to address mapping for this domain 5 IN PTR ns1.shamly.local.
I tried adding my mail server domain (mail.shamly.local) in /etc/mail/local-host-names, but then i got the error that the receiver cannot be found. I was trying to send a mail to another user account within the same mail server.
The thing is i can send mail to out side mail boxes (e.g. gmail), but not to users within my own domain.
You didn't post the offending email address, so I guess it was something like user@shamly.local. If that's the case, you should add shamly.local also in /etc/mail/local-host-names
Regarding your dns settings, there are a couple of errors in the reverse zone:
Quote:
shamly.local. IN A 192.168.1.103
A records are not needed
Quote:
199.1.168.192.in-addr.arpa. IN A mail.shamly.local.
should be
Code:
199.1.168.192.in-addr.arpa. IN PTR mail.shamly.local.
Quote:
5 IN PTR ns1.shamly.local.
According to the forward zone ns1 ip is 192.168.1.109, so the correct is
The solution did not fix my problem .
I am trying to send the mail from my account `shamly1` to my other dummy account `shafraz`. `www.shamly.local` works fine by the way, only the mail MX record that seems to give me problems.
I have added the modified zone files as well as the output from maillog below ...
Please Help ..
shamly.local.zone file
Code:
$TTL 604800
; Information about "forward" domain microsys-asia.info
$ORIGIN shamly.local.
@ IN SOA ns1.shamly.local. webmaster.shamly.local. (
2004042601 ; serial
86400 ; refresh
7200 ; retry
1209600 ; expiry
604800 ) ; minimum
; Define name servers for this domain
IN NS ns1.shamly.local.
IN MX 10 mail.shamly.local.
;shamly.local. IN A 192.168.1.103
ns1.shamly.local. IN A 192.168.1.109
; Define name to address mapping for this domain
www.shamly.local. IN A 192.168.1.103
mail.shamly.local. IN A 192.168.1.199
*.shamly.local. IN A 192.168.1.103
; Loopback domain
localhost IN A 127.0.0.1
reverse.shamly.local.zone
Code:
; Information about "inverse" domain 1.168.192.in-addr.arpa.
@ IN SOA ns1.shamly.local. webmaster.shamly.local. (
2004042601 ; serial (d. adams)
86400 ; refresh
7200 ; retry
1209600 ; expiry
604800 ) ; minimum
; Define name servers for this domain
IN NS ns1.shamly.local.
199.1.168.192.in-addr.arpa. IN PTR mail.shamly.local.
; Define name to address mapping for this domain
109 IN PTR ns1.shamly.local.
maillog output
Code:
Feb 3 03:52:20 localhost sendmail[14794]: o12MMKPh014794: from=<shamly1@mail.shamly.local>, size=418, class=0, nrcpts=1, msgid=<4B6BAE34.8070307@mail.shamly.local>, proto=ESMTP, daemon=MTA, relay=[192.168.1.201]
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014794: SYSERR(root): mail.shamly.local. config error: mail loops back to me (MX problem?)
Feb 3 03:52:20 localhost sendmail[14797]: o12MMKYe014797: mail.shamly.local [192.168.1.199] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014794: to=<shafraz@mail.shamly.local>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120418, relay=mail.shamly.local. [192.168.1.199], dsn=5.3.5, stat=Local configuration error
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014794: to=shamly1, ctladdr=root (8/0), delay=00:00:00, mailer=local, pri=120418, dsn=5.1.1, stat=User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014794: o12MMKPh014796: DSN: User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: to=<shamly1@mail.shamly.local>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=31637, relay=mail.shamly.local., dsn=5.3.5, stat=Local configuration error
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: to=shamly1, ctladdr=root (8/0), delay=00:00:00, mailer=local, pri=31637, dsn=5.1.1, stat=User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: to=shamly1, ctladdr=root (8/0), delay=00:00:00, mailer=local, pri=31637, dsn=5.1.1, stat=User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: o12MMKPi014796: return to sender: User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPi014796: to=shamly1, ctladdr=root (8/0), delay=00:00:00, mailer=local, pri=2661, dsn=5.1.1, stat=User unknown
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: Losing ./qfo12MMKPh014796: savemail panic
Feb 3 03:52:20 localhost sendmail[14796]: o12MMKPh014796: SYSERR(root): savemail: cannot save rejected email anywhere
in both zones and restart named, so it can understand the changes.
From maillog it looks like there are more than one errors. How did you install sendmail, because it looks like it's misconfigured.
Anyway:
1. You use shamly1@mail.shamly.local and it tries to be delivered at 192.168.1.201 ??? while it should be local. I guess this is configured perviously in dns and was not changed.
Also better use shamly1@shamly.local and add shamly.local in /etc/mail/local-host-names. Of course you need to restart sendmail. To test your config without the need to send mails, you can use:
Code:
sendmail -bv shamly1@shamly.local
2.About "user unknown": Is the user shamly1 a real (system) user, or what? What's in /etc/mail/virtusertable?
Looks like a permissions problem, that's why I've asked you how did you install sendmail. Usually /var/spool/mail must be owned by root:mail and permissions should be 770 or 775:
Code:
# ls -ld /var/spool/mail/
drwxrwxr-x 2 root mail 4096 Dec 3 14:37 /var/spool/mail/
1. 192.168.1.201 is my windows machine IP. I was sending mail from my Thunderbird client.
2. I have installed "dovecot (tar.gz)" as my mail server for POP3 and IMAP. Dovecot is in the same machine as sendmail (192.168.1.199). 192.168.1.103 is the IP in which the name server (named) exists.
The users are created in a db file (configured in dovecot.conf) and not as a system user. I can access my mailbox using Thunderbird. Is that whats causing the problem u think for sendmail?. Oh and /etc/mail/virtusertable is empty
3. /var/spool/mail permissions are as follows in my linux box
# ls -ld /var/spool/mail/
drwxrwxr-x 4 root mail 4096 Feb 2 17:57 /var/spool/mail/
4. I did not install sendmail. I used the default setup that comes with red hat linux and modified the configuration.
I added shamly.local in /etc/mail/local-host-names
increased the serial number from 2004042601 to 2004042611 on both files but i still get the same error
I can send you the complete set of files used for dovecot, named and sendmail if it will help.
1. My fault. Didn't notice that 192.168.1.201 was at the "From:..." line
2. If the users exist in a file known to dovecot, but are not system users, sendmail does not know how to handle mail to them. That's why you get "user unknown". Take a look here to see what modifications you have to do in sendmail.mc, in order to use dovecot to deliver mail. I cannot help you more on this, as I've never used dovecot.
3. Doesn't matter. Te problem is explained from the previous point.
4. As said above you have to reconfigure sendmail
No need any config files. Just run the following and post the output:
shafraz@mail.shamly.local... deliverable: mailer esmtp, host mail.shamly.local., user shafraz@mail.shamly.local
So, your sendmail still thinks that mail.shamly.local is not local. That's why you get the loopback error. You need to add mail.shamly.local and all other domains that must use your mailserver in /etc/mail/local-host-names and restart sendmail.
I have managed to get the mail system working .. . I made quite a few changes to the configuration of sendmail as well as dovecot and trying to back trace what I had done. I will let you know what modifications I had made. Gimme a bit of time.
Thanks a lot for all the help you have given me. It has helped me a lot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.