Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAILFROM option broken between 1.6.1 and 1.7.0 #166

Closed
djsissom opened this issue Nov 15, 2023 · 9 comments
Closed

MAILFROM option broken between 1.6.1 and 1.7.0 #166

djsissom opened this issue Nov 15, 2023 · 9 comments

Comments

@djsissom
Copy link

I'm using postfix to route outgoing email from a cronie crontab entry to an Apple iCloud+ SMTP server, which requires the FROM address to be on the approved list in order to send mail.

In my (root) crontab, I've set the appropriate MAILFROM address:
MAILFROM='[email protected]'

After updating cronie to 1.7.0, the journalctl entry for postfix after the cron job outputs shows:
postfix/qmgr[887]: 1BC705E2030: from=<>, size=782, nrcpt=1 (queue active)

Downgrading cronie to 1.5.7 gives the expected result, and I receive the email:
postfix/qmgr[887]: 0531D5E2030: from=<[email protected]>, size=766, nrcpt=1 (queue active)

My other server is still running version 1.6.1, and that also is still working correctly, so the regression seems to have happened somewhere between 1.6.1 and 1.7.0.

Git-diffing the two commits, there seem to be a couple of places where "mailfrom" is touched between releases, notably in anacron/runjob.c and src/do_command.c.

@t8m
Copy link
Member

t8m commented Nov 16, 2023

Do you see this for both cron based and anacron based jobs or just for one of these?

@t8m t8m added the bug label Nov 16, 2023
@t8m
Copy link
Member

t8m commented Nov 16, 2023

Hmm... actually this was an intentional change from #118

@t8m t8m added invalid and removed bug labels Nov 16, 2023
@t8m
Copy link
Member

t8m commented Nov 16, 2023

I assume we could make this optional.

@djsissom
Copy link
Author

I get the reasoning behind #118, but if I'm understanding correctly what's happening on my end, now even explicitly setting MAILFROM to a valid address in the crontab results in outgoing mail being rejected from the relay because of the missing FROM header.

I should be able to downgrade to 1.5.7 for the time being until fixed.

The full postfix log when an email should be sent:

Nov 15 16:24:01 motoko postfix/pickup[6912]: 1BC705E2030: uid=0 from=<>

Nov 15 16:24:01 motoko postfix/cleanup[7142]: 1BC705E2030: message-id=<[email protected]>

Nov 15 16:24:01 motoko postfix/qmgr[887]: 1BC705E2030: from=<>, size=782, nrcpt=1 (queue active)

Nov 15 16:24:03 motoko postfix/smtp[7144]: 1BC705E2030: to=<[email protected]>, relay=smtp.mail.me.com[17.42.251.41]:587, delay=2.1, delays=0.03/0.03/1/1, dsn=5.7.0, status=bounced (host smtp.mail.me.com[17.42.251.41] said: 550 5.7.0 From address is not one of your addresses (in reply to MAIL FROM command))

Nov 15 16:24:04 motoko postfix/qmgr[887]: 1BC705E2030: removed

@t8m t8m added enhancement and removed invalid labels Nov 16, 2023
@t8m
Copy link
Member

t8m commented Nov 16, 2023

Can you please try applying 3428028 4e8c767 c640f4f to see if that works for you?

@djsissom
Copy link
Author

Yes, perfect! That works for me as expected and makes the Apple servers happy again.

Thanks for the quick attention!

@igxlin
Copy link

igxlin commented Jan 11, 2024

Hi, may I know when there will be a release with this fix? As the MAILFROM doesn't work in 1.7.0, this fix is quite necessary. Thanks a lot.

@t8m
Copy link
Member

t8m commented Jan 12, 2024

I've done a new release now.

@igxlin
Copy link

igxlin commented Jan 12, 2024

Thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants