I have a perl program that sends email out. It is called from other perl programs as well as shell scripts. When run from the command prompt it works as expected. However, when it is run from a cron entry and I send an email from myself to myself (from u...@example.com to u...@example.com) from my computer I get a 'Relaying not allowed' error from the smtp server.

an example:
Sep 28 19:42:56 star1 postfix/smtp[911]: E6DE91BDC2B: to=<u...@example.com>, relay=mail.example.com[205.178.100.12]:2525, delay=0.31, delays=0.05/0/0.21/0.05, dsn=5.0.0, status=bounced (host mail.example.com[205.178.100.12] said: 550 Relaying not allowed (in reply to MAIL FROM command))

I have talked to the help desk for the smtp server and where I was using port 25 they recommended 2525. Where I was using smtp.example.com they suggested trying mail.example.com. I have also put specific usernames in the sender_relay file as well. None of these changes helped.

I looked through the variables in env and set and no variables seemed to be relevant for this problem.

A search of the web and the archive on Postfix has turned up nothing even close to my problem.

Some email recipients ISPs will not except direct email. It has to go through an acceptable mail server. I assume this means that I have to use a rely host.

output from postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 5
html_directory = no
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 12480000
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_connection_cache_on_demand = no
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtpd_client_restrictions = permit_mynetworks, reject
smtpd_sasl_auth_enable = yes
unknown_local_recipient_reject_code = 550

/etc/postfix/sender_relay
*@isp.net       [smtp.isp.net]:2525
*@example.com   [smtp.example.com]:2525

/etc/postfix/sender_canonical
root    dwoo...@isp.net
user1     dwoo...@isp.net
user      u...@example.com

/etc/postfix/sasl_passwd
[example.com]:2525   *@example.com:password
star1.home.com  user:password

Thanks for any help,

David


Reply via email to