[exim-dev] [Bug 1420] Exim is handled escaped by '>' strings…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrey A Moiseenko
Ημερομηνία:  
Προς: exim-dev
Αντικείμενο: [exim-dev] [Bug 1420] Exim is handled escaped by '>' strings incorrectly
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1420




--- Comment #5 from Andrey A. Moiseenko <support@???> 2013-12-22 02:41:46 ---
(In reply to comment #4)

Yes, the reason of escaped string is added is procmail calls.
I have just added user and group switching into procmail_pipe:
procmail_pipe:
debug_print = "T: procmail_pipe for $local_part@$domain"
driver = pipe
path = "/bin:/usr/bin:/usr/local/bin"
# command = "/usr/bin/procmail -d $local_part@$domain"
command = "/bin/root/hosting/procmail_conv.sh /usr/bin/procmail -d
$local_part@$domain"
# return_path_add
delivery_date_add
envelope_to_add
check_string = "From "
escape_string = ">From "
# log_output
# return_output
# user = $local_part@$domain
user = ${lookup mysql{SELECT username FROM exim WHERE
email='${quote_mysql:$local_part@$domain}'}}
group = mail

Note that if I replace "escape_string" = "XX-From: " for example and comment
"user" and "group", then that will have no desirable effect ("escape_string =
..." is ignored).

The /bin/root/hosting/procmail_conv.sh file is for converting IDNA e-mail name
to username:

#!/bin/sh

un=`/bin/root/hosting/add_email.out -format "$3"`
"$1" "$2" "$un"

And, the part of procmailrc is used to resend the copy of message to a
different e-mail on the first e-mail arrive like:

:0 c
* ^To:.*(@mydomain1\.ru|@mydomain\.com).*
* !^Received: .*from procmail by mydomain.com with local.*
* !^Received: .*from Debian-exim by mydomain.com with local.*
* !^Subject: .*New\ user\ on\ forum.*
* !^Subject: .*\[DISCARD\].*
| /bin/root/resend_procmail.sh otheremail@???


/bin/root/resend_procmail.sh:
#!/bin/sh

/bin/root/escape_procmailed.out | cat /bin/root/hlp_1.txt /dev/stdin |
/usr/bin/spamassassin | /usr/sbin/sendmail -i "$1"

escape_procmailed.out is my C++ compilled pogramm for removing ">From ..." line
from header

/bin/root/hlp_1.txt:
Received: from procmail by mydomain.com with local

This temporarily solution above is removing escaped strings from e-mails
received (after using user and group options in procmail_pipe:) and resent
letters (by removing escaped string manually). And all messages are processed
normally because they are not contain illegal escaped header lines.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email