smtp-server: 501 5.1.7 Invalid address


smtp-server: 501 5.1.7 Invalid address
. . . message not sent


mailx receives smtp-server: 501 5.1.7 Invalid address when shell script triggered via crontab job ; no errors received and mail delivered to recipient when same shell script executed on linux prompt.


1. Invalid email address or domain name in recipient filled value -c or at the end of line in mailx.

mailx -S -s 'Test Mail' -c

2. Invalid smtp server mentioned in -S clause of mailx

mailx -S -s 'Test Mail' -c

3. Sender's address is wrongly interpreted when mailx is scheduled from crontab shell script job.


1. Correct the recipient's email address by verifying its existence in outlook address book.

2. Correct smtp server address which can resolve recipient email address decalred in mailx.

3. Add the sender's email address or alias in mailx -r ; email address which has worked in past when executed from linux prompt ; So that it will not be formed based on cron execution daemon which may not be resolvable by smtp host in many cases.

mailx -S -s 'Test Mail' -r -c

No comments:

Post a Comment