Forum OpenACS Q&A: Bad sender address syntax - postfix

Request notifications

Posted by Archie Spinos on
Good day,

I have setup postfix and can send emails using the mail cmd client.
When I try to send notifications with openacs mail lite through the postfix it fails. In the mail log I can see that the sender is not being passed from the app to postfix correctly so it fails. Some extracts showing the issue:

input attribute name: address
input attribute value:
private/rewrite socket: wanted attribute: (list terminator)
input attribute name: (end)
rewrite_clnt: local: ->
event_request_timer: reset 0x8a124e 0x10a64a0 5
send attr request = resolve
send attr sender =
send attr address =

resolve_clnt: ' ->' -> transp=relay-smtps' host=[]:465' rcpt=`' flags=error class=local

ctable_locate: install entry key

warning: Illegal address syntax from localhost[] in MAIL command:

extract_addr: in:, result:

localhost[]: 501 5.1.7 Bad sender address syntax

This happens even though I specify in the app sender address =

Any ideas on how to get past this? Should I make use of generic maps to translate all incoming emails to a specific email known to postfix server and if yes how?

Many thanks

Posted by Gustaf Neumann on
Hi Archie,

i am not sure, what the problem might be. However, i would recommend to separate mail with notification issues. You can test the acs-mail to postfix interface with a command like the following from the developer shell (ds/shell):

acs_mail_lite::send_immediately -to_addr SOMEADDRESS -from_addr SOMEADDR -subject hi -body "What's up?"
If this works, then the problem is somewhere in the addressed generated by the notification clients.

What version of OpenACS are you using?

Best regards

Posted by Archie Spinos on
Good morning Gustaf,

When I executed above from ds/shell I got the following:


while executing
"ad_raise notfound"
(procedure "rp_serve_abstract_file" line 32)
invoked from within
"rp_serve_abstract_file "$root/$extra_url""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"smtp::sendmessage ::mime::1 -originator -header {From} -heade..."
("eval" body line 1)
invoked from within
"eval $cmd_string"
(procedure "acs_mail_lite::smtp" line 30)
invoked from within
"acs_mail_lite::smtp -multi_token $tokens -headers $headers_list -originator $originator"
(procedure "acs_mail_lite::send_immediately" line 155)
invoked from within
"acs_mail_lite::send_immediately -to_addr -from_addr -subject hi -body "What's up?""
("uplevel" body line 1)
invoked from within
"uplevel 1 [string map {"\\\r\n" " "} $script

How can I find the OpenACS version (I inherited the support so not very knowledgeable yet.)


Posted by Gustaf Neumann on
That's weird ...but it shows that the problem is in acs-mail-lite. You have definitely some older version installed, since the traceback above shows that "acs_mail_lite::smtp" calls "eval $cmd_string", which is not the case in current versions, which use a catch operation [1]. The "originator" field causing the problem is determined in [2] and passed as last argument to "acs_mail_lite::smtp" and uses "acs_mail_lite::bounce_address".

It looks to me, as if in your installation, the bounce prefix (parameter EnvelopePrefix of package acs-mail-lite) is not set correctly (look under /acs-admin, you can see/change the parameters of the installed services there). The parameter should have a value like e.g. "bounce".

The versions of OpenACS and the installed packages are listed by the package manager (/acs-admin/apm/). For OpenACS, this looks currently like the image below.

Hope this helps


Posted by Archie Spinos on

I had actually left the EnvelopePrefix blank, and your answer led me there.

Many thanks,

Much appreciated