E-mail group addresses such as undisclosed-recipients:;
or a group:<u1@example.net>,<u@x.example.net>;
are valid forms of addressing according to RFC 5322, see for instance the illustrative example in Appendix A.1.3. In Sendmail, this is called "list syntax". Minimal working example (for Bash):
echo "Date: $(date --rfc-2822)
From: <someone@example.net>
To: a group:<r1@example.net>,<r2@example.net>;
" | sendmail -t
However, trying to submit messages with empty groups leads to error List:; syntax illegal for recipient addresses
. Minimal example:
echo "Date: $(date --rfc-2822)
From: <someone@example.net>
To: undisclosed-recipients:;
Bcc: someone-else@example.net
" | sendmail -t
returns
undisclosed-recipients:;... List:; syntax illegal for recipient addresses
How can Sendmail be configured to support empty RFC 5322 group addresses when submitting messages via sendmail -t
?
sendmail -t
is the default for PHP mail() e.g. on *nix systems.sendmail -t ...
to process such addresses? a) ignore b) expand LOCAL mailing lists/aliasesfoo:;
is an empty group. It should be ignored just like(foo)
or" "
.