Discussion:
fatal: parameter "smtpd_recipient_restrictions"?
(too old to reply)
You
2004-05-15 20:42:43 UTC
Permalink
May 15 16:25:13 cosmo postfix/smtpd[19997]: fatal: parameter
"smtpd_recipient_restrictions": specify at least one working instance of:
check_relay_domains, reject_unauth_destination, reject, defer or
defer_if_permit May 15 16:25:14 cosmo
postfix/master[13359]: warning: process /usr/libexec/postfix/smtpd pid
19997 exit status 1 May 15 16:25:14 cosmo postfix/master[13359]:
warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling

Hi folks can someone decode the above statement for me? I have read
through the archives and one solution given that there should be an entry
along the lines of:

smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination

In main.cf which I added only to recieve the message you see above in my
log files.

What I am trying to do is add amavisd to my set-up, it seems that postfix
is passing mail off to amavis and amavis (which can't seem to find CLAMD
socket but that is a different list) is passing it back however the local
delivery is not happening! Here are the additions I made to the default
master.cf file (postfix 2.0.18)

(email may break the line but -o smtpd_reci... is all one line)

#Amavisd
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,
reject_unauth_destination
-o mynetworks=127.0.0.0/8

smtp-amavis unix - - y - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes



Here is postconf -n:

[***@cosmo root]# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, $mydomain,
$myhostname.$mydomain, $config_directory/localdomains
myhostname = b-dub.org
mynetworks = 192.168.1.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.0.11/README_FILES
relayhost = mail.optonline.net
sample_directory = /usr/share/doc/postfix-2.0.11/samples
sender_canonical_maps = hash:/etc/postfix/canonical
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
unknown_local_recipient_reject_code = 450
virtual_alias_maps = hash:/etc/postfix/virtual
[***@cosmo root]#

Thanks for your assistance,
Johnny Poston
John Fawcett
2004-05-15 20:51:41 UTC
Permalink
From: "You"
Post by You
#Amavisd
127.0.0.1:10025 inet n - y - -
smtpd
Post by You
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,
reject_unauth_destination
-o mynetworks=127.0.0.0/8
shouldn't it be

-o smtpd_recipient_restrictions=permit_mynetworks, reject

instead of reject_unauth_destination?

John
You
2004-05-15 21:00:04 UTC
Permalink
Post by John Fawcett
Post by You
#Amavisd
127.0.0.1:10025 inet n - y - -
smtpd
Post by You
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,
reject_unauth_destination
-o mynetworks=127.0.0.0/8
shouldn't it be
-o smtpd_recipient_restrictions=permit_mynetworks, reject
instead of reject_unauth_destination?
John
Thanks John,
However making both main.cf line and maste.cf line read ..., reject
resulted in the same errors as above.

What other information can I provide?
John Fawcett
2004-05-15 21:10:36 UTC
Permalink
From: "You" > Thanks John,
Post by You
However making both main.cf line and maste.cf line read ..., reject
resulted in the same errors as above.
What other information can I provide?
Only make that change in master.cf not in main.cf.
With the change in main.cf you will reject mail from outside
your networks directed to your domain.

However that does not explain why you still get this
error.

Did you restart postfix?

Do you still have old messages in the queue, maybe
you need to requeue them after restarting postfix.

postsuper -r ALL

John
You
2004-05-15 21:28:25 UTC
Permalink
Post by John Fawcett
From: "You" > Thanks John,
Post by You
However making both main.cf line and maste.cf line read ..., reject
resulted in the same errors as above.
What other information can I provide?
Only make that change in master.cf not in main.cf.
With the change in main.cf you will reject mail from outside
your networks directed to your domain.
However that does not explain why you still get this
error.
Did you restart postfix?
Do you still have old messages in the queue, maybe
you need to requeue them after restarting postfix.
postsuper -r ALL
John
John,
Thanks again! So how should main.cf smtp_recipient_restrictions read?
should it be there at all?

Yes I restarted Postfix, however I had 38 messages that bouncing around
which were delivered after postsuper -r ALL which I just ran.

Thanks again,
JWP
John Fawcett
2004-05-15 21:41:03 UTC
Permalink
From: "You"
Post by You
Thanks again! So how should main.cf smtp_recipient_restrictions read?
should it be there at all?
Yes. It's used for relay control and anti-UCE configuration.

The default value in main.cf is:
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
which lets only mynetworks relay.

Depending on your requirements, you might want to add other restrictions.
Take a look at the following:
http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions

http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt

John
You
2004-05-15 21:56:24 UTC
Permalink
Post by John Fawcett
From: "You"
Post by You
Thanks again! So how should main.cf smtp_recipient_restrictions read?
should it be there at all?
Yes. It's used for relay control and anti-UCE configuration.
smtpd_recipient_restrictions = permit_mynetworks,
reject_unauth_destination
which lets only mynetworks relay.
Depending on your requirements, you might want to add other restrictions.
http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions
http://jimsun.linxnet.com/misc/postfix-anti-UCE.txt
John
Alright John I give up for now.

Master.cf
...
-o smtpd_recipient_restrictions=permit_mynetworks, reject
...

Main.cf
...
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
...

Same error message, oh well. Thanks for your help I will take another
crack at it next weekend I guess.

Thanks again,
JWP
John Fawcett
2004-05-15 22:01:08 UTC
Permalink
From: "You"
Post by You
Alright John I give up for now.
Master.cf
...
-o smtpd_recipient_restrictions=permit_mynetworks, reject
...
Main.cf
...
smtpd_recipient_restrictions = permit_mynetworks,
reject_unauth_destination
Post by You
...
Same error message, oh well. Thanks for your help I will take another
crack at it next weekend I guess.
Maybe I misinterpreted your previous message. I thought that the
mail was delivered after you restarted postfix and requeued it?

John
You
2004-05-15 22:13:31 UTC
Permalink
Post by John Fawcett
From: "You"
Post by You
Alright John I give up for now.
Master.cf
...
-o smtpd_recipient_restrictions=permit_mynetworks, reject
...
Main.cf
...
smtpd_recipient_restrictions = permit_mynetworks,
reject_unauth_destination
Post by You
...
Same error message, oh well. Thanks for your help I will take another
crack at it next weekend I guess.
Maybe I misinterpreted your previous message. I thought that the
mail was delivered after you restarted postfix and requeued it?
Oh, sorry I misrepresnted myself, I have to reset my main and master to
last known working and default (respectively) in order to actually recieve
mail.

My method of testing was to make changes to master and main (so they are
configured as in initial message)
$postfix reload
send my self a test message and check the logs to see that postfix could
not finish delivery, restore main,master
$postfix reload
$postsuper -r ALL
$postfix flush
Repeat, (making suggested changes) ad nauseum.

Thanks,
Johnny Poston
John Fawcett
2004-05-15 22:33:44 UTC
Permalink
From: "You"
Post by You
My method of testing was to make changes to master and main (so they are
configured as in initial message)
$postfix reload
send my self a test message and check the logs to see that postfix could
not finish delivery, restore main,master
$postfix reload
$postsuper -r ALL
$postfix flush
Repeat, (making suggested changes) ad nauseum.
Thanks,
Johnny Poston
I think you should set up master and main to the correct
values, restart postfix, requeue existing messages and then
send yourself a test message. If the test message is not
delivered, then post the logged errors from that message.

John
You
2004-05-15 22:54:40 UTC
Permalink
Post by John Fawcett
From: "You"
Post by You
My method of testing was to make changes to master and main (so they are
configured as in initial message)
$postfix reload
send my self a test message and check the logs to see that postfix could
not finish delivery, restore main,master
$postfix reload
$postsuper -r ALL
$postfix flush
Repeat, (making suggested changes) ad nauseum.
Thanks,
Johnny Poston
I think you should set up master and main to the correct
values, restart postfix, requeue existing messages and then
send yourself a test message. If the test message is not
delivered, then post the logged errors from that message.
John
If I come off frustrated it is b/c I am about to throw this machine
through the window, it is in no way directed towards you. I GREATLY
APPRECIATE your patience and willingness to help.

Maybe I wasn't clear but you just described my process. Except obviously
I haven't hit on the Correct parameters. The last set I attempted are
here (which resulted in the same error message in my logs that I have been
describing):

Master.cf (Default +):
#Amavisd
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks, reject
-o mynetworks=127.0.0.0/8

smtp-amavis unix - - y - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes

Main.cf: A working set of values +
content_filter = smtp-amavis:[127.0.0.1]:10024
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination

[***@cosmo postfix]# date
Sat May 15 18:41:04 EDT 2004
[***@cosmo postfix]# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, $mydomain,
$myhostname.$mydomain, $config_directory/localdomains
myhostname = CCCCC.org
mynetworks = 192.168.1.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.0.11/README_FILES
relayhost = mail.optonline.net
sample_directory = /usr/share/doc/postfix-2.0.11/samples
sender_canonical_maps = hash:/etc/postfix/canonical
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination
unknown_local_recipient_reject_code = 450
virtual_alias_maps = hash:/etc/postfix/virtual
[***@cosmo postfix]#

After:
$postsuper -r ALL
$postfix flush
$postfix flush #why not?
$postfix reload

Send test mail, this is the result in my log file:



May 15 18:42:44 cosmo postfix/master[13359]: reload configuration
May 15 18:43:08 cosmo postfix/smtpd[20879]: connect from
cheshire1.inetu.net[226.235.192.224]
May 15 18:43:08 cosmo postfix/smtpd[20879]: 35CEE4076:
client=cheshire1.nnnnn.net[226.235.192.224]
May 15 18:43:08 cosmo postfix/cleanup[20881]: 35CEE4076:
message-id=<***@YYYYYYY.com>
May 15 18:43:08 cosmo postfix/nqmgr[20877]: 35CEE4076:
from=<***@YYYY.com>, size=920, nrcpt=1 (queue a
ctive)
May 15 18:43:08 cosmo postfix/smtpd[20879]: disconnect from
cheshire1.nnnn.net[226.235.192.224]
May 15 18:43:17 cosmo postfix/smtpd[20886]: fatal: parameter
"smtpd_recipient_restrictions": specify at least one working i
nstance of: check_relay_domains, reject_unauth_destination, reject, defer
or defer_if_permit
May 15 18:43:18 cosmo postfix/master[13359]: warning: process
/usr/libexec/postfix/smtpd pid 20886 exit status 1
May 15 18:43:18 cosmo postfix/master[13359]: warning:
/usr/libexec/postfix/smtpd: bad command startup -- throttling
May 15 18:44:18 cosmo postfix/smtpd[20888]: fatal: parameter
"smtpd_recipient_restrictions": specify at least one working i
nstance of: check_relay_domains, reject_unauth_destination, reject, defer
or defer_if_permit
May 15 18:44:19 cosmo postfix/master[13359]: warning: process
/usr/libexec/postfix/smtpd pid 20888 exit status 1
May 15 18:44:19 cosmo postfix/master[13359]: warning:
/usr/libexec/postfix/smtpd: bad command startup -- throttling


Thanks again for your help,
JWP
You
2004-05-15 23:19:14 UTC
Permalink
John,
In my last message (after desc my parameters) When I sent the command
$postsuper -r ALL
that was executed with a working set of main.cf and master.cf sorry my
frustration clouded my thinking, and I prolly confused the situation
further.

For reference whenever I am running

postsuper -r ALL

it is with a verified working pair of cf files. I then switch to the set
of parameters that is attempting to use amavisd and results in the error
that I have posted.

Thanks again,
JWP

(My apologies for mailing you off-list John)
Noel Jones
2004-05-15 23:48:13 UTC
Permalink
Post by You
#Amavisd
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks, reject
-o mynetworks=127.0.0.0/8
you can't have spaces in master.cf options.

-o smtpd_recipient_restrictions=permit_mynetworks,reject

note no space in "permit_mynetworks,reject" above.
The README.postfix included with amavisd-new shows correct examples of
how to set this, as do the postfix docs.
--
Noel Jones
You
2004-05-16 01:42:03 UTC
Permalink
Post by Noel Jones
you can't have spaces in master.cf options.
-o smtpd_recipient_restrictions=permit_mynetworks,reject
note no space in "permit_mynetworks,reject" above.
The README.postfix included with amavisd-new shows correct examples of
how to set this, as do the postfix docs.
John and Noel thanks for your patience time and efforts sorry it took so
many keystrokes. Removing the space did the trick, though I am sure you
knew it would. Now I am off to find out why Amavisd cannot find CLAMD.

Thanks again,
JWP
John Fawcett
2004-05-16 06:30:58 UTC
Permalink
From: "You"
Post by You
Post by Noel Jones
you can't have spaces in master.cf options.
-o smtpd_recipient_restrictions=permit_mynetworks,reject
note no space in "permit_mynetworks,reject" above.
The README.postfix included with amavisd-new shows correct examples of
how to set this, as do the postfix docs.
John and Noel thanks for your patience time and efforts sorry it took so
many keystrokes. Removing the space did the trick, though I am sure you
knew it would. Now I am off to find out why Amavisd cannot find CLAMD.
The it was my bad advice that prolunged your pain. (re-writing instead of
copying
and pasting) :-(
Glad it's working now thanks to Noel.

John

Loading...