LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   problem with sending mail in postfix (https://www.linuxquestions.org/questions/linux-server-73/problem-with-sending-mail-in-postfix-861758/)

sohailkmu 02-10-2011 01:40 AM

problem with sending mail in postfix
 
Dear All,


I have configured postfix on centos 5.5. When I compose a mail through squirrel mail. Nothing happens and the browswer just shows that wating for ------/webmail/src/-----. No error message appears even.

My log file is a given below:

Feb 10 14:09:51 its postfix/smtpd[19334]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit



Kindly help me

Noway2 02-10-2011 04:32 AM

"smtpd_recipient_restrictions" is one of the configuration parameters in your /etc/postfix/main.cf file. It looks like you have a syntax error in this file. Most configurations I have seen put multiple restrictions on separate lines. The different restrictions are on a line by themselves with whitespace at the start of the line. For example:
Code:

smtpd_recipient_restrictions =
  permit_mynetworks
  permit_sasl_authenticated
  permit_mx_backup
  reject_unauth_destination
  reject_unknown_recipient_domain
  check_policy_service inet:127.0.0.1:60000
  permit

When you attempt to start/restart postfix as a service you should see error messages in syslog and or mail.log. An error message like this one should show up at that time and prevent postfix from even starting.

sohailkmu 02-12-2011 01:36 AM

Quote:

Originally Posted by Noway2 (Post 4253918)
"smtpd_recipient_restrictions" is one of the configuration parameters in your /etc/postfix/main.cf file. It looks like you have a syntax error in this file. Most configurations I have seen put multiple restrictions on separate lines. The different restrictions are on a line by themselves with whitespace at the start of the line. For example:
Code:

smtpd_recipient_restrictions =
  permit_mynetworks
  permit_sasl_authenticated
  permit_mx_backup
  reject_unauth_destination
  reject_unknown_recipient_domain
  check_policy_service inet:127.0.0.1:60000
  permit

When you attempt to start/restart postfix as a service you should see error messages in syslog and or mail.log. An error message like this one should show up at that time and prevent postfix from even starting.


My error messages are now:

Feb 12 12:36:52 its postfix/qmgr[2900]: warning: connect to transport smtp-amavis: No such file or directory
Feb 12 12:36:59 its postfix/smtpd[7178]: fatal: /etc/postfix/main.cf, line 685: missing '=' after attribute name: "check_policy_service inet:127.0.0.1:60000"
Feb 12 12:37:00 its postfix/master[2882]: warning: process /usr/libexec/postfix/smtpd pid 7178 exit status 1
Feb 12 12:37:00 its postfix/master[2882]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

Noway2 02-13-2011 07:33 AM

You have at least two errors in your configuration file(s) and these are keeping postfix from starting. Note, the check_policy_service line is for postgrey and if you are not using that filtering application you don't need it. I am not sure why it is complaining about missing the = sign, though, which does sound like a syntax or hidden character error.

The amavis-transport error looks more critical. Do you have amavis installed? Is it running and listening on the appropriate port? With amavis, you configure your master.cf file such that mail is first delivered to amavis on one port, e.g. 10024, it is processed and then re-injected into the queue on another port, eg. 10025. The error "warning: connect to transport smtp-amavis: No such file or directory" suggests that you have something misconfigured in your master.cf.

Check these files really closely.

Did you follow a particular how to document for setting this up? If so, if you copy text from them you can get bad characters such as ` instead of ' which can cause A LOT of problems.

rytec 03-04-2011 05:55 AM

I have also a question about this Amavis.
This morning after I rebooted my server and after I have noticed that people asked me that they did not receive my mails I started looking into the logfiles of mail.
Then I saw that postfix/smtp could not connect to port 10024. I was not aware directly this was Amavis.
So after some googling I recognized things and yes Amavis was not running because of an error.
Now where can I activate some kind of notification when I send mails and this happens again, I directly get notified of mails that aren't sent? Is it in the main.cf I have to add something or is it else?

I already have this active :
bounce_notice_recipient = postmaster
2bounce_notice_recipient = postmaster
notify_classes = bounce, 2bounce, resource, software, protocol, delay

but still get no message to postmaster of amavis or content filter is not running.

NOTE! I realise now that if amavisd is not running it's not possible to send any mail beside if I could run a script which bypasses the 10024 port and goes strait to postfix


All times are GMT -5. The time now is 07:25 AM.