<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sendmail DSN message tweaking in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556894#M649732</link>
    <description>Hello Todd,&lt;BR /&gt;&lt;BR /&gt;Interesting question and unusual requirement.&lt;BR /&gt;&lt;BR /&gt;Do not worry about asking it. We all learn&lt;BR /&gt;every day. After 25 years in Unix/Linux I&lt;BR /&gt;still consider myself to be a "beginner".&lt;BR /&gt;&lt;BR /&gt;Welcome to the ITRC Forums and I hope&lt;BR /&gt;you will have good experiences. There are&lt;BR /&gt;some very knowledgeable, polite and&lt;BR /&gt;helpful people in them.&lt;BR /&gt;&lt;BR /&gt;Who am I and what I do is here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.circlingcycle.com.au/dusan.html" target="_blank"&gt;http://www.circlingcycle.com.au/dusan.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;a) To add customised X-Headers is easy.&lt;BR /&gt;Here is an example from my own sendmail.mc&lt;BR /&gt;file:&lt;BR /&gt;&lt;BR /&gt;LOCAL_CONFIG&lt;BR /&gt;HX-MyCompany-1: The message passed MyCompany MTA.&lt;BR /&gt;HX-MyCompany-2: These headers warrant that this is&lt;BR /&gt;HX-MyCompany-3: MyCompany Compliant Message and not spam.&lt;BR /&gt;HX-MyCompany-4: If you suspect any wrongdoings&lt;BR /&gt;HX-MyCompany-5: please notify abuse@mycompany.dom.&lt;BR /&gt;&lt;BR /&gt;b)  X-Headers are user-defined, unofficial&lt;BR /&gt;message header fields that exist in the&lt;BR /&gt;message header. X-Headers are not&lt;BR /&gt;specifically mentioned in RFC 2822, but the&lt;BR /&gt;use of an undefined message header field&lt;BR /&gt;starting with "X-" has become an accepted&lt;BR /&gt;way to add unofficial message header fields&lt;BR /&gt;to a message.  In other words, there are no &lt;BR /&gt;correct  syntax, as X-headers are unofficial.&lt;BR /&gt;&lt;BR /&gt;c) One idea just came to me. It needs to be fully tested but I think it should work.&lt;BR /&gt;&lt;BR /&gt;If messages in the queue are undeliverable,&lt;BR /&gt;one could copy or move them into another queue and that way "duplicate" them.&lt;BR /&gt;&lt;BR /&gt;Then, via simple sed, Perl, or awk&lt;BR /&gt;script, one could manipulate the messages&lt;BR /&gt;in that queue and add whatever headers...&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;&lt;BR /&gt;1. Create a new mail queue:&lt;BR /&gt;&lt;BR /&gt;# cd /var/spool&lt;BR /&gt;&lt;BR /&gt;# mkdir myqueue2&lt;BR /&gt;&lt;BR /&gt;# chmod 0700 myqueue2&lt;BR /&gt;&lt;BR /&gt;2. Create a new sendmail config, where you&lt;BR /&gt;simply change the mail queue directory:&lt;BR /&gt;&lt;BR /&gt;# cp /etc/mail/sendmail.cf /etc/mail/myqueue.cf&lt;BR /&gt;&lt;BR /&gt;# diff /etc/mail/sendmail.cf /etc/mail/myqueue.cf&lt;BR /&gt;&lt;BR /&gt;442c442&lt;BR /&gt;&amp;lt; O QueueDirectory=/var/spool/mqueue&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; O QueueDirectory=/var/spool/myqueue2&lt;BR /&gt;637c637&lt;BR /&gt;&lt;BR /&gt;3. Copy the messages in the deferred queue:&lt;BR /&gt;&lt;BR /&gt;# cp -p /var/spool/mqueue/* /var/spool/myqueue2&lt;BR /&gt;&lt;BR /&gt;Make sure that your qf and df unique&lt;BR /&gt;numbers are changed in myqueue2 directory.&lt;BR /&gt;Otherwise, Sendmail will not process&lt;BR /&gt;the messages! Something like this:&lt;BR /&gt;&lt;BR /&gt;# cd /var/spool/myqueue2/&lt;BR /&gt;# mv dfo02MkveL023825 dfo02MkveL023829&lt;BR /&gt;# mv qfo02MkveL023825 qfo02MkveL023829&lt;BR /&gt;&lt;BR /&gt;You can also modify the messages anyway you want (add headers, change them, and so on).&lt;BR /&gt;&lt;BR /&gt;4. Then:&lt;BR /&gt;&lt;BR /&gt;# chgrp smmsp /var/spool/myqueue2/df* /var/spool/myqueue2/qf*&lt;BR /&gt;&lt;BR /&gt;5. Finally, run this queue:&lt;BR /&gt;&lt;BR /&gt;# /usr/sbin/sendmail â  C /etc/mail/myqueue.cf â  q&lt;BR /&gt;&lt;BR /&gt;There are no silly questions, just silly answers :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;</description>
    <pubDate>Sat, 02 Jan 2010 23:18:31 GMT</pubDate>
    <dc:creator>VK2COT</dc:creator>
    <dc:date>2010-01-02T23:18:31Z</dc:date>
    <item>
      <title>Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556888#M649726</link>
      <description>I am trying to find where to tweak the information (i.e., dsn mail) when a Sendmail QueueWarn or QueueReturn_DSN occurs.&lt;BR /&gt;Does anyone know where to change the text and variables provided in the message back to the sender?&lt;BR /&gt;&lt;BR /&gt;TYIA&lt;BR /&gt;Todd&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2009 00:41:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556888#M649726</guid>
      <dc:creator>Todd Everett</dc:creator>
      <dc:date>2009-12-31T00:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556889#M649727</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;There is no simple configuration method&lt;BR /&gt;to customize MTA errors.&lt;BR /&gt;&lt;BR /&gt;One way is to introduce your own rulesets.&lt;BR /&gt;An example from my own sendmail.mc metaconfig&lt;BR /&gt;file:&lt;BR /&gt;&lt;BR /&gt;LOCAL_RULESETS&lt;BR /&gt;SCheckHdr&lt;BR /&gt;R$*     $: $(isASCII $1 $: &lt;OK&gt; $)&lt;BR /&gt;R&lt;OK&gt;   $@ OK&lt;BR /&gt;R$*     $#error $@ 5.6.1 $: "554 8bit data not allowed in headers (RFC 2822, section 2.2)"&lt;BR /&gt;&lt;BR /&gt;The customised messages that are easily done&lt;BR /&gt;are via access tables but they are not really related to queue warnings. Here is one&lt;BR /&gt;line from my own Linux server at home&lt;BR /&gt;("support@microsoft.com" is actually very&lt;BR /&gt;heavily used by spammers):&lt;BR /&gt;&lt;BR /&gt;support@microsoft.com   ERROR:550 Anti-spamming policy triggered. Security audi&lt;BR /&gt;t of your activities will be reported to Federal agencies. Bye bye!&lt;BR /&gt;&lt;BR /&gt;Otherwise, for other customized messages,&lt;BR /&gt;you would probably need to change the source&lt;BR /&gt;code.&lt;BR /&gt;&lt;BR /&gt;For example, download Sendmail sources, go&lt;BR /&gt;to subdirectory named "sendmail" and&lt;BR /&gt;there you will find files like&lt;BR /&gt;&lt;BR /&gt;err.c&lt;BR /&gt;srvrsmtp.c&lt;BR /&gt;recipient.c&lt;BR /&gt;queue.c&lt;BR /&gt;and so on&lt;BR /&gt;&lt;BR /&gt;In other words, the directory for the&lt;BR /&gt;latest version of Sendmail might look like:&lt;BR /&gt;&lt;BR /&gt;/usr/local/src/sendmail-8.14.3/sendmail&lt;BR /&gt;&lt;BR /&gt;It all depends on what condition causes&lt;BR /&gt;MTA warnings.&lt;BR /&gt;&lt;BR /&gt;They all contain various error messages.&lt;BR /&gt;For example, in srvrsmtp.c, you have the&lt;BR /&gt;following define:&lt;BR /&gt;&lt;BR /&gt;#define MSG_TEMPFAIL "451 4.3.2 Please try again later"&lt;BR /&gt;&lt;BR /&gt;or, these statements:&lt;BR /&gt;&lt;BR /&gt;message("454 4.5.4 Internal error: unable to encode64");&lt;BR /&gt;message("421 4.7.0 %s Too many bad commands; closing connection",&lt;BR /&gt;usrerr("452 4.4.5 Insufficient disk space; try again later");&lt;BR /&gt;usrerr("454 4.3.0 Please try again later");&lt;BR /&gt;message("454 4.5.4 Temporary authentication failure");&lt;BR /&gt;message("454 4.3.3 TLS not available after start");&lt;BR /&gt;usrerr("454 4.7.0 Please try again later");&lt;BR /&gt;message("454 4.3.3 TLS not available: error generating SSL handle");&lt;BR /&gt;message("454 4.3.3 TLS not available: error set fd");&lt;BR /&gt;&lt;BR /&gt;I think you get the idea...&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;/OK&gt;&lt;/OK&gt;</description>
      <pubDate>Fri, 01 Jan 2010 05:47:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556889#M649727</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2010-01-01T05:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556890#M649728</link>
      <description>HI&lt;BR /&gt;&lt;BR /&gt;And you, vk2cow should not be answering sendmail questions.  You are providing procedure that do not exist.  You are providing file references that do not exist.  THIS NOT LINUX.&lt;BR /&gt;&lt;BR /&gt;Todd&lt;BR /&gt;&lt;BR /&gt;You find your QueueWarn or QueueReturn_DSN in the /etc/mail/sendmail.cf file.  I.e.,&lt;BR /&gt;&lt;BR /&gt;"...CONFIG: New options confTO_QUEUERETURN_DSN and confTO_QUEUEWARN_DSN to control queue return and warning times for delivery status notifications...."&lt;BR /&gt;&lt;BR /&gt;After you modify the sendmail.cf file you stop / start the daemon.</description>
      <pubDate>Fri, 01 Jan 2010 18:10:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556890#M649728</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-01-01T18:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556891#M649729</link>
      <description>Hello Michael,&lt;BR /&gt;&lt;BR /&gt;I am surprised by the harshness of your tone.&lt;BR /&gt;&lt;BR /&gt;a) Sendmail is not Linux owned. Never was&lt;BR /&gt;and never will.&lt;BR /&gt;&lt;BR /&gt;Sendmail is an open-source Mail Transfer&lt;BR /&gt;Agent (albeit, there is a commercial version&lt;BR /&gt;too).&lt;BR /&gt;&lt;BR /&gt;b) I answered the question for three reasons:&lt;BR /&gt;&lt;BR /&gt;1. Anybody can grab the sources and&lt;BR /&gt;compile them on HP-UX too. There is&lt;BR /&gt;nothing wrong about it :)&lt;BR /&gt;&lt;BR /&gt;So, there is a way to modify the&lt;BR /&gt;code.&lt;BR /&gt;&lt;BR /&gt;2. You are very wrong about configuration&lt;BR /&gt;parameters in Sendmail:&lt;BR /&gt;&lt;BR /&gt;O Timeout.queuewarn.normal=4h&lt;BR /&gt;O Timeout.queuewarn.urgent=1h&lt;BR /&gt;O Timeout.queuewarn.non-urgent=12h&lt;BR /&gt;O Timeout.queuewarn.dsn=4h&lt;BR /&gt;&lt;BR /&gt;They define TIMES not the messages! The&lt;BR /&gt;question in the thread was not related to customisation of the times but the&lt;BR /&gt;contents of the messages they send back&lt;BR /&gt;to senders!&lt;BR /&gt;&lt;BR /&gt;3. It is good for others to learn various&lt;BR /&gt;tricks with MTA. Consider it to&lt;BR /&gt;be a reference to for someone else.&lt;BR /&gt;&lt;BR /&gt;c) My radio amateur radio call-sign is not&lt;BR /&gt;vk2cow, but vk2cot :)&lt;BR /&gt;&lt;BR /&gt;Ahh, let's not start 2010 with harsh&lt;BR /&gt;words. There is enough of them in the real&lt;BR /&gt;world as it is. I know, I was in the forces&lt;BR /&gt;in my old days.&lt;BR /&gt;&lt;BR /&gt;Be happy,&lt;BR /&gt;&lt;BR /&gt;VK2COT (25 years in Unix, VMS, and Linux&lt;BR /&gt;and counting...)</description>
      <pubDate>Fri, 01 Jan 2010 22:36:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556891#M649729</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2010-01-01T22:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556892#M649730</link>
      <description>vk2cow should not be answering sendmail questions in hp-ux&lt;BR /&gt;&lt;BR /&gt;this is not linux&lt;BR /&gt;&lt;BR /&gt;we are not here to read about linux or share what your knowledge is regarding linux&lt;BR /&gt;&lt;BR /&gt;And if you don't understand the differences in HP-UX sendmail and Linux then you should take a class.</description>
      <pubDate>Sat, 02 Jan 2010 00:07:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556892#M649730</guid>
      <dc:creator>Michael Steele_2</dc:creator>
      <dc:date>2010-01-02T00:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556893#M649731</link>
      <description>VK2COT: Thank you for the help. I am obviously a Sendmail newbie here, so sorry for the basic questions.&lt;BR /&gt;&lt;BR /&gt;I checked in my working and template sendmail.mc files and do not see:&lt;BR /&gt;"SCheckHdr"&lt;BR /&gt;"#error"&lt;BR /&gt;&lt;BR /&gt;What I am really trying to do is the following:&lt;BR /&gt;Sendmail by default sends 1 queuewarn message and then 1 queuereturn message. I need to generate 3 queuewarn messages over a period before the queuereturn. &lt;BR /&gt;What I was hoping to do was to find a way to pull the original message out of the queuewarn(1) and send it off with a new X-Header to mark it so that I would get:&lt;BR /&gt;original email&lt;BR /&gt;queuewarn (original)&lt;BR /&gt;email (2)&lt;BR /&gt;queuewarn (2)&lt;BR /&gt;queuereturn (original)&lt;BR /&gt;queuereturn (2)&lt;BR /&gt;&lt;BR /&gt;Yes, I realize that would be sending 2 copies of the email if the original queued once...&lt;BR /&gt;&lt;BR /&gt;Any ideas on how to do this or a better approach?&lt;BR /&gt;&lt;BR /&gt;Thank you very much.&lt;BR /&gt;Happy New Year!&lt;BR /&gt;&lt;BR /&gt;Todd</description>
      <pubDate>Sat, 02 Jan 2010 18:39:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556893#M649731</guid>
      <dc:creator>Todd Everett</dc:creator>
      <dc:date>2010-01-02T18:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sendmail DSN message tweaking</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556894#M649732</link>
      <description>Hello Todd,&lt;BR /&gt;&lt;BR /&gt;Interesting question and unusual requirement.&lt;BR /&gt;&lt;BR /&gt;Do not worry about asking it. We all learn&lt;BR /&gt;every day. After 25 years in Unix/Linux I&lt;BR /&gt;still consider myself to be a "beginner".&lt;BR /&gt;&lt;BR /&gt;Welcome to the ITRC Forums and I hope&lt;BR /&gt;you will have good experiences. There are&lt;BR /&gt;some very knowledgeable, polite and&lt;BR /&gt;helpful people in them.&lt;BR /&gt;&lt;BR /&gt;Who am I and what I do is here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.circlingcycle.com.au/dusan.html" target="_blank"&gt;http://www.circlingcycle.com.au/dusan.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;a) To add customised X-Headers is easy.&lt;BR /&gt;Here is an example from my own sendmail.mc&lt;BR /&gt;file:&lt;BR /&gt;&lt;BR /&gt;LOCAL_CONFIG&lt;BR /&gt;HX-MyCompany-1: The message passed MyCompany MTA.&lt;BR /&gt;HX-MyCompany-2: These headers warrant that this is&lt;BR /&gt;HX-MyCompany-3: MyCompany Compliant Message and not spam.&lt;BR /&gt;HX-MyCompany-4: If you suspect any wrongdoings&lt;BR /&gt;HX-MyCompany-5: please notify abuse@mycompany.dom.&lt;BR /&gt;&lt;BR /&gt;b)  X-Headers are user-defined, unofficial&lt;BR /&gt;message header fields that exist in the&lt;BR /&gt;message header. X-Headers are not&lt;BR /&gt;specifically mentioned in RFC 2822, but the&lt;BR /&gt;use of an undefined message header field&lt;BR /&gt;starting with "X-" has become an accepted&lt;BR /&gt;way to add unofficial message header fields&lt;BR /&gt;to a message.  In other words, there are no &lt;BR /&gt;correct  syntax, as X-headers are unofficial.&lt;BR /&gt;&lt;BR /&gt;c) One idea just came to me. It needs to be fully tested but I think it should work.&lt;BR /&gt;&lt;BR /&gt;If messages in the queue are undeliverable,&lt;BR /&gt;one could copy or move them into another queue and that way "duplicate" them.&lt;BR /&gt;&lt;BR /&gt;Then, via simple sed, Perl, or awk&lt;BR /&gt;script, one could manipulate the messages&lt;BR /&gt;in that queue and add whatever headers...&lt;BR /&gt;&lt;BR /&gt;Something like this:&lt;BR /&gt;&lt;BR /&gt;1. Create a new mail queue:&lt;BR /&gt;&lt;BR /&gt;# cd /var/spool&lt;BR /&gt;&lt;BR /&gt;# mkdir myqueue2&lt;BR /&gt;&lt;BR /&gt;# chmod 0700 myqueue2&lt;BR /&gt;&lt;BR /&gt;2. Create a new sendmail config, where you&lt;BR /&gt;simply change the mail queue directory:&lt;BR /&gt;&lt;BR /&gt;# cp /etc/mail/sendmail.cf /etc/mail/myqueue.cf&lt;BR /&gt;&lt;BR /&gt;# diff /etc/mail/sendmail.cf /etc/mail/myqueue.cf&lt;BR /&gt;&lt;BR /&gt;442c442&lt;BR /&gt;&amp;lt; O QueueDirectory=/var/spool/mqueue&lt;BR /&gt;---&lt;BR /&gt;&amp;gt; O QueueDirectory=/var/spool/myqueue2&lt;BR /&gt;637c637&lt;BR /&gt;&lt;BR /&gt;3. Copy the messages in the deferred queue:&lt;BR /&gt;&lt;BR /&gt;# cp -p /var/spool/mqueue/* /var/spool/myqueue2&lt;BR /&gt;&lt;BR /&gt;Make sure that your qf and df unique&lt;BR /&gt;numbers are changed in myqueue2 directory.&lt;BR /&gt;Otherwise, Sendmail will not process&lt;BR /&gt;the messages! Something like this:&lt;BR /&gt;&lt;BR /&gt;# cd /var/spool/myqueue2/&lt;BR /&gt;# mv dfo02MkveL023825 dfo02MkveL023829&lt;BR /&gt;# mv qfo02MkveL023825 qfo02MkveL023829&lt;BR /&gt;&lt;BR /&gt;You can also modify the messages anyway you want (add headers, change them, and so on).&lt;BR /&gt;&lt;BR /&gt;4. Then:&lt;BR /&gt;&lt;BR /&gt;# chgrp smmsp /var/spool/myqueue2/df* /var/spool/myqueue2/qf*&lt;BR /&gt;&lt;BR /&gt;5. Finally, run this queue:&lt;BR /&gt;&lt;BR /&gt;# /usr/sbin/sendmail â  C /etc/mail/myqueue.cf â  q&lt;BR /&gt;&lt;BR /&gt;There are no silly questions, just silly answers :)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;</description>
      <pubDate>Sat, 02 Jan 2010 23:18:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sendmail-dsn-message-tweaking/m-p/4556894#M649732</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2010-01-02T23:18:31Z</dc:date>
    </item>
  </channel>
</rss>

