LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Keeping sendmail from stripping manually inserted header (http://www.linuxquestions.org/questions/linux-server-73/keeping-sendmail-from-stripping-manually-inserted-header-763442/)

edderkop 10-21-2009 08:54 AM

Keeping sendmail from stripping manually inserted header
 
I've got an OpenEMM installation to send newsletters, which is working fine. The problem is that I need to use DKIM to sign my outbound mails, so as to not end up in any spam filters. As OpenEMM itself doesn't support DKIM I wrote a perl script that inserts the required header and moves the generated qf and df files to the sendmail mailqueue.
The mails get sent but before that sendmail removes the inserted DKIM headers again.
I put quite some effort into learning how to set up sendmail and its basic administration but this particular problem beats me. Can someone give me a hint why sendmail does that and where I can change this behavior? I've got a deadline to meet, so any help we be greatly appreciated! :-)

BTW: Unfortunately, I do have to use sendmail as it's the only MTA supported by OpenEMM.

Thanks in advance!

edderkop

unSpawn 10-21-2009 10:58 AM

Does this: http://brneurosci.org/linuxsetup97.html explain it (using DKIM milter at http://sourceforge.net/projects/dkim-milter/)?

edderkop 10-22-2009 02:56 AM

Quote:

Originally Posted by unSpawn (Post 3727382)

I do, in fact, use the DKIM milter - and that might actually be the problem, I'll try disabling it in the sendmail.mc and see if my header still gets removed.
I guess I could have it signed by the milter but we want to have a more flexible approach by implementing our own signer functionality so that the signed messages can either be sent to the system-wide sendmail (the way it's handled now) or back to OpenEMM's own sendmail process. The problem is that OpenEMM uses a home-brewed sendmail implementation and the various parts of the mailer functionality (such as generating the mailings, adding headers, passing the mailings to the MTA...) are distributed on several different parts of the source distribution, implemented in Java, Python and C. As im somewhat proficient in Java, I tried to implement the signer functionality in the source code but finally gave up as it turned out that that solution would be far more complicated and thus time-consuming than I had assumed initially. It's feasible but I need a quicker solution, at least for the time being. So I got the idea to interrupt the sending process, grab the generated mailings, sign them and move them on to the system-wide sendmail process.
In fact, I had totally forgotten about the DKIM-milter and anyway it doesn't appear to be correctly set up as my outbound mails don't get signed. But the plugin might be responsible for removing the headers.

Anyway, thanks for your reply. I will post my progress here.

edderkop 10-23-2009 01:40 AM

I found the mistake - my header was malformed. Everything's working fine now. Thanks for your help, unSpawn. :-)

hydrofoil 04-20-2011 05:44 PM

More detail please
 
"I got the idea to interrupt the sending process, grab the generated mailings, sign them and move them on to the system-wide sendmail process."

Can you give more specific detail to code modification please?

Thank you very much.


All times are GMT -5. The time now is 04:57 AM.