LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-13-2011, 06:17 AM   #1
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Rep: Reputation: 0
postfix local users unable to send mail


Hi,

We are using postfix for relaying our internal system generated mail to other domain through google apps.

All client servers able to send mail through the postfix server, only user of local postfix server(root, etc) unable to send mail with command like mutt, mail.My detail configuration given below:
Code:
 postconf -n
output
Code:
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks2, regexp:/etc/postfix/header_checks_porn
html_directory = no
inet_interfaces = all
local_recipient_maps = $virtual_mailbox_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 15728640
mydomain = xyz.co.in
myhostname = smtp.xyz.co.in
mynetworks = 172.21.10.15, 127.0.0.0/8, 192.168.10.0/24, 192.168.1.0/24, 192.168.3.0/25, 192.168.4.0/24, 172.21.10.0/24, 172.21.1.0/24, 172.21.3.0/25 172.21.15.0/25, 172.21.16.0/25
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = xyz.co.in, xyz.com, xyz1.com, xyz2.org, xyz3.com, localhost
relay_recipient_maps = hash:/etc/postfix/relay_recipients
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_connect_timeout = 15s
smtp_helo_timeout = 400s
smtpd_client_restrictions = check_client_access hash:/etc/postfix/client_access, permit_sasl_authenticated
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_hard_error_limit = 3
smtpd_helo_required = yes
smtpd_helo_restrictions = check_helo_access hash:/etc/postfix/helo_access, reject_invalid_helo_hostname,  permit
smtpd_recipient_restrictions = permit_mynetworks                               permit_auth_destination                               permit_sasl_authenticated                               reject_unknown_sender_domain                               reject_unauth_destination                               reject_unknown_recipient_domain                               reject_unverified_recipient                               reject_invalid_helo_hostname,                               reject_non_fqdn_helo_hostname,                               reject_rbl_client multi.uribl.com,                               reject_rbl_client dsn.rfc-ignorant.org,                               reject_rbl_client list.dsbl.org,                               reject_rbl_client sbl-xbl.spamhaus.org,                               reject_rbl_client sbl.spamhaus.org,                               reject_rbl_client bl.spamcop.net,                               reject_rbl_client dnsbl.sorbs.net,                               reject_rbl_client cbl.abuseat.org,                               reject_rbl_client sengerbase.com,                               reject_rbl_client combined.rbl.msrbl.net,                               reject_rbl_client nuclearelephant.com,                               reject_rhsbl_sender block.rhs.mailpolice.com,                               reject_rhsbl_client block.rhs.mailpolice.com,                               reject_rhsbl_sender porn.rhs.mailpolice.com,                               reject_rhsbl_client porn.rhs.mailpolice.com,                               reject_rhsbl_sender fraud.rhs.mailpolice.com,                               reject_rhsbl_client fraud.rhs.mailpolice.com,                               reject_rhsbl_sender adult.rhs.mailpolice.com,                               reject_rhsbl_client adult.rhs.mailpolice.com,                               reject_rhsbl_sender dynamic.rhs.mailpolice.com,                               reject_rhsbl_client dynamic.rhs.mailpolice.com,                               reject_rhsbl_client bulk.rhs.mailpolice.com,                               reject_rhsbl_client bulk.rhs.mailpolice.com,                               permit
transport_maps = hash:/etc/postfix/transport
unknown_address_reject_code = 554
unknown_client_reject_code = 550
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:1000
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = ldap:/etc/postfix/ldap_usr.cf
virtual_minimum_uid = 100
virtual_uid_maps = static:1000
Code:
 vim /etc/hosts
Code:
127.0.0.1               localhost.localdomain localhost
172.21.10.15            smtp.xyz.co.in smtp
Code:
 vim /etc/postfix/client_access
Code:
localhost.localdomain OK
localhost OK
127.0.0.1 OK
Code:
 vim /etc/postfix/helo_access
Code:
localhost.localdomain OK
localhost OK
127.0.0.1 OK
While trying to send mail from root user showing the following error in maillog:
Code:
 connect from localhost.localdomain[127.0.0.1]
 E344E9E98A0: client=localhost.localdomain[127.0.0.1]
disconnect from localhost.localdomain[127.0.0.1]
Please provide me the solution so that I can send mail from root and other system users.

Please update me if you require any other information.

Thanks in advance.
 
Old 07-13-2011, 08:28 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
connect from localhost.localdomain[127.0.0.1]
E344E9E98A0: client=localhost.localdomain[127.0.0.1]
disconnect from localhost.localdomain[127.0.0.1]
That doesn't look like any Postfix log that I have ever seen. Lets start with a more complete segment from the mail log that shows a complete transaction summary. The log messages will indicate things like time stamps and the daemon process involved, which your snippit is missing.
 
Old 07-13-2011, 09:19 AM   #3
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Yes I truncated it

Full log is
Code:
Jul 13 19:35:52 smtp postfix/smtpd[3116]: connect from localhost.localdomain[127.0.0.1]
Jul 13 19:35:52 smtp postfix/smtpd[3116]: F12D39E9447: client=localhost.localdomain[127.0.0.1]
Jul 13 19:35:53 smtp postfix/smtpd[3116]: disconnect from localhost.localdomain[127.0.0.1]
Thanks

Last edited by baps123; 07-13-2011 at 12:13 PM.
 
Old 07-14-2011, 03:39 AM   #4
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
please update...
looking for help
 
Old 07-14-2011, 04:20 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
The small section of the log entry above shows that connections are being established, the queue manager is assigning an ID to the message and the sending application is disconnecting. It doesn't show what is happening to the message, which can be a little bit convoluted. Here is an example from my own server, where root sent a daily mail to myself. I believe this is quite similar to your case as it is a local account sending mail to a non account address (I use virtual delivery).

As you can see the codes, like your F12D39E9447 represent the ID of the message and can be used to follow what is happening. You can also see the action of the different daemon processes, like qmgr, cleanup, and pickup. In my case, root contacts Postfix via localhost and the message is assigned an ID of BDBB0D94. This is put into the queue and the smtpd process re-sends it out and it is given the id of 94BF2ADD. The purpose here is content scanning. Once it has been declared 'clean' it is passed back into the queue and delivered. Note that the BDBB0D94 is still part of the ID string. Upon delivery, Dovecot picks the message up and holds it for reception.

You will need to examine your logs for the transaction trail to see what is happening. The information you provided does not answer this question. While the 'error' may be in your main.cf that you posted, it is difficult to even guess what parameter may be responsible.

Code:
Jul 14 03:00:01 server postfix/pickup[13768]: BDBB0D94: uid=0 from=<root>
Jul 14 03:00:01 server postfix/cleanup[14081]: BDBB0D94: message-id=<20110714070001.BDBB0D94@myserver.mydomain>
Jul 14 03:00:01 server postfix/qmgr[8134]: BDBB0D94: from=<root@myserver.mydomain>, size=6217, nrcpt=1 (queue active)
Jul 14 03:00:11 server postfix/smtpd[14088]: connect from localhost[127.0.0.1]
Jul 14 03:00:11 server postfix/smtpd[14088]: 94BF2ADD: client=localhost[127.0.0.1]
Jul 14 03:00:11 server postfix/cleanup[14081]: 94BF2ADD: message-id=<20110714070001.BDBB0D94@myserver.mydomain>
Jul 14 03:00:11 server postfix/qmgr[8134]: 94BF2ADD: from=<root@myserver.mydomain>, size=6681, nrcpt=1 (queue active)
Jul 14 03:00:11 server postfix/smtpd[14088]: disconnect from localhost[127.0.0.1]
Jul 14 03:00:11 server amavis[8983]: (08983-06) Passed CLEAN, <root@mmyserver.mydomain> -> <me@email.domain>, Message-ID: <20110714070001.BDBB0D94@mmyserver.mydomain>, mail_id: a9UfmofMIAD5, Hits: -0.001, size: 6217, queued_as: 94BF2ADD, 9798 ms
Jul 14 03:00:11 server postfix/smtp[14084]: BDBB0D94: to=<me@email.domain>, relay=127.0.0.1[127.0.0.1]:10024, delay=10, delays=0.2/0.03/0.01/9.8, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=08983-06, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 94BF2ADD)
Jul 14 03:00:11 server postfix/qmgr[8134]: BDBB0D94: removed
Jul 14 03:00:11 server dovecot: deliver(me@email.domain): msgid=<20110714070001.BDBB0D94@myserver.mydomain>: saved mail to INBOX
Jul 14 03:00:11 server postfix/pipe[14089]: 94BF2ADD: to=<mme@email.domain>, relay=dovecot, delay=0.16, delays=0.07/0.01/0/0.07, dsn=2.0.0, status=sent (delivered via dovecot service)
Jul 14 03:00:11 server postfix/qmgr[8134]: 94BF2ADD: removed
 
Old 07-17-2011, 11:24 AM   #6
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
In my case it seems that while sending mail from local users, localhost.localdomain getting connected and instantly disconnecting due to some reason.
There might be some minor adjustment which needs to be done in main.cf file (which I provided earlier) and hopefully you all expert people can figure it out.
 
Old 07-23-2011, 11:03 AM   #7
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
is there anyone who can help me???????
 
Old 07-26-2011, 01:16 AM   #8
baps123
LQ Newbie
 
Registered: Apr 2010
Posts: 13

Original Poster
Rep: Reputation: 0
any update please??????
 
Old 07-26-2011, 05:11 AM   #9
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I am wondering if you have some sort of application conflict. The output you have provided looks like it contains a lot of items that may be conflicting and it looks jumbled. For example, you have xyz.co.in listed in both mydomain and relay_domain and if it is the domain of the server, why would you relay for that domain? I think one thing you might want to do is try to pare back to a simple Postfix main.cf and see if you can get things to work. Then start adding in additional controls one at a time until you find one that breaks things.

Also is localhost.localdomain truly what is appearing as the connection attempt or are you using that as an example? I ask because seeing "localhost.localdomain" seems weird in a Postfix log which normally has connect from localhost. For example, I normally only see
Code:
postfix/smtpd[3529]: connect from localhost[127.0.0.1]
It looks like whatever process is trying to send mail is dropping the connection before it completes. So another approach may be to look at it from the perspective of Postfix not being the problem. What happens when you try to do an SMTP test via telnet or better yet, just launch sendmail from the command line?
 
  


Reply



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
Postfix cant send mail in local or any outer domain vikki Linux - Server 4 07-22-2009 03:40 PM
Mail(x) on Slackware 12.2 does not send mail to local users wilson47 Linux - Software 4 03-03-2009 03:46 PM
Postfix - allowing only certain users to send mail to a mail ID rahmathullakm Linux - Server 3 02-07-2009 11:05 AM
postfix local users send mail restriction y_zl Linux - Security 3 01-04-2009 11:04 PM
Postfix: Do not allow local users to send mail Termina Linux - Server 1 03-22-2007 05:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:48 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