LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-07-2024, 10:18 AM   #1
mike1950r
LQ Newbie
 
Registered: Oct 2021
Posts: 24

Rep: Reputation: Disabled
prevent procmail from adding Return-path


Hi,

I'm forwarding mails as a copy to another domain.

Sometimes I get an error message saying:

Mail rejected. DMARC check failed. OFR_515
[515] (in reply to end of DATA command)

I could imagine, that this is because procmail changes the return-path original to my server send path.
And dkim entry in the original mail is made for the original sender.

So I think if it would make sense to keep the original return-path in the forwarded mail.

How could I do this?

The forwarding code follows:

Code:
:0 c
* (^TO_|for.*)mail@mydomain.com
* !^X-Loop: mail@mydomain.com
* !^From mail@otherdomain.com
{
	:0 hfw
	* ^Subject:\/.+
	| formail -I "Subject: FORWARDED:$MATCH"
	:0 a
	! mail@otherdomain.com
}
Thanks in advance for any tip.

Cheers mike

Last edited by mike1950r; 04-07-2024 at 02:47 PM.
 
Old 04-08-2024, 09:27 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,314

Rep: Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327
Do you really want to inform the sender that your relaying attempt failed? Surely, that's something for you to sort out, not him.
 
Old 04-08-2024, 09:49 AM   #3
mike1950r
LQ Newbie
 
Registered: Oct 2021
Posts: 24

Original Poster
Rep: Reputation: Disabled
Wink

Quote:
Originally Posted by business_kid View Post
Do you really want to inform the sender that your relaying attempt failed? Surely, that's something for you to sort out, not him.
thanks for your response.

i just want to get the forwarded email accepted and not refused.
i do not know why these certain mails from a bank are refused, when beeing forwarded by my server.

other users of procmail also complain, that procmail changes the return-path.
i want to forward the email like it is, just with an additional mark in the subject.
i thought this could be perhaps the reason. my server does not add a dkim when forwarding emails from other domains.
so the dkim of the original domain seems to be the problem.

anyway it was a try.

cheers mike
 
Old 04-08-2024, 11:33 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,314

Rep: Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327Reputation: 2327
It's been decades since I messed with procmail, but ISTR it was entirely set up by the config file and the delivery recipe. I'd Google for similar issues or post the configs here (relevant portions).

To judge by the deathly quiet on this, either everyone has moved over to another MDA or to another method altogether. I never use smtp anymore myself, but webmail.
 
Old 04-08-2024, 12:25 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,729

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Or. Adjust the DMARC validation on otherdomain.com to allow the copied messages.

Does it work when you forward manually?

Last edited by scasey; 04-08-2024 at 12:27 PM.
 
Old 04-08-2024, 12:36 PM   #6
mike1950r
LQ Newbie
 
Registered: Oct 2021
Posts: 24

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
Or. Adjust the DMARC validation on otherdomain.com to allow the copied messages.

Does it work when you forward manually?
Hi,

thanks for the input.
Manually forwarding causes same problem.

May be removing the dkim entry from the originally message could be a solution.
If the is no dkim inside, no dkim verification would be done, perhaps nomore error messages?

Sure the problem is at the recipient side.
Other users of this domain complain, that some emails do not arrive, with same error report like posted above.
So the forwarding is not the problem.

Sounds tricky ...

Thanks anyway.

Cheers mike
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Procmail on Rocky Linux using Postfix and Maildir - Procmail not working for Spamassassin cmstechnical Linux - Newbie 1 05-02-2022 05:24 AM
procmail: Skipped "{" and procmail: Closing brace unexpected mike1950r Linux - Software 5 10-23-2021 01:18 PM
Prevent echo as a return value? zizou86 Programming 4 01-25-2010 12:00 PM
Problem with mail delivery procmail>cyrus imap (using sendmail,procmail,cyrus,imap) bwana Linux - Software 2 03-24-2005 07:01 PM
return 0 or return(0) in C? servnov Programming 5 01-08-2005 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration