mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #633] Impossible to send mail from Symfony since 1.28.3 #394
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#394
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maixal on GitHub (Jan 27, 2026).
Original GitHub issue: https://github.com/axllent/mailpit/issues/633
Hi,
In 1.28.2, mailpit works perfectly.
In 1.28.3, i have this error :
Process failed with exit code 1: sendmail: 501 5.5.4 Syntax error in parameters or arguments (invalid FROM parameter)In 1.28.4, i have this error :
Process failed with exit code 1: sendmail: 553 5.1.3 The address is not a valid RFC 5321 addressI use Symfony 7.3.
Here the code to send an email :
It not have "FROM" but when i have from() it's same error :
Thanks to fix it or add an option to disable the new feature...
@axllent commented on GitHub (Jan 28, 2026):
I'm really not sure what could be causing this issue, other than than your Symfony mailer is not sending using an RFC-compliant address. Have you looked at the Mailpit log to see if it provides any clues as to what is wrong? In 1.28.4 I changed the error message to provide better clarity as to why it is failing, which is caused by:
a) a space somewhere between
<and>in theFROM: <...>, orb) an invalid email address between the
<and>in theFROM: <...>@maixal commented on GitHub (Jan 28, 2026):
Here the log :
@maixal commented on GitHub (Jan 28, 2026):
I have found the issue ! It's default behaviour of ssmtp.
By default, on alpine, php use ssmtp service for relay email.
By default, ssmtp set phpuser@host as FROM for email.
I have set
FromLineOverride=YESin/etc/ssmtp/ssmtp.confand now it's works because i can overwrite FROM inside Symfony.But i think, you will have the issue with all php users which uses ssmtp...
@axllent commented on GitHub (Jan 28, 2026):
Actually
phpuser@hostis perfectly ok, but what is definitely NOT ok is the trailing carriage return\rat the end:FROM:<www-data@php83.dev.local\r>".This would (or at least should) fail validation on any RFC-compliant SMTP server, and is even related to a recent Mailpit security advisement @ CVE.
Did you by any chance create or edit the ssmtp configuration file(s) using something like Notepad on Windows? I'm just trying to work out the origin of the
\rcharacter.@maixal commented on GitHub (Jan 29, 2026):
Yes it was a problem with EOL between CRLF and LF on ssmtp.conf :s
@axllent commented on GitHub (Jan 29, 2026):
Thanks for the feedback, that explains it. My guess is that ssmtp parses the configuration file manually line by line, split by
\n, meaning the\rremains. If this is considered a bug, then it's an ssmtp bug - but then again, never edit anything with notepad 😃