Re: [exim] Maximum size of filter

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Todd Lyons
Ημερομηνία:  
Προς: Luca Bertoncello
Υ/ο: exim-users
Αντικείμενο: Re: [exim] Maximum size of filter
Mine of course is drastically different. I get all of my data in the
transport, instead of setting it in the router and passing it to the
transport.

Macros:

AUTORESPONDER_TO = ${if def:h_Return-Path: {$h_Return-Path:} { ${if
def:h_Errors-To: {$h_Errors-To:} {$sender_address}}}}

AUTORESPONDER_TEXT =
${perl{get_autoresponder_data}{message}{AUTORESPONDER_DEFAULT_TEXT}{MYSQL_SERVER}}

AUTORESPONDER_SUBJECT =
${rfc2047:${perl{get_autoresponder_data}{subject}{AUTORESPONDER_DEFAULT_SUBJECT}{MYSQL_SERVER}}}

AUTORESPONDER_ADD_HEADERS = "Precedence: junk\nAuto-Submitted:
auto-generated\nX-Auto-Response-Suppress: OOF,
AutoReply\nContent-Type: text/plain;
charset=UTF-8\nContent-Transfer-Encoding: 8bit"


Router:
autoresponder_always:
driver = accept
domains = +local_domains
condition = AUTORESPONDER_ACTIVE
condition = ${if eq{AUTORESPONDER_FREQUENCY}{1} {1}{0}}
condition = IS_A_MAILBOX
condition = AUTORESPONDER_BULK_REGEX
transport = autoresponder_always_t
errors_to = SET_RETURN_PATH
no_expn
unseen


Transport:
autoresponder_always_t:
driver = autoreply
log = USER_MAILDIR/vacation.log
from = ${quote_local_part:$local_part}\@${quote:$domain}
to = AUTORESPONDER_TO
text = AUTORESPONDER_TEXT
subject = AUTORESPONDER_SUBJECT
headers = AUTORESPONDER_ADD_HEADERS
user = MAILUID
group = MAILGID


Hope this helps.

...Todd


On Tue, Sep 30, 2014 at 9:20 AM, Luca Bertoncello <lucabert@???> wrote:
> Todd Lyons <tlyons@???> schrieb:
>
>> I'm not sure if this is related to your Exim version or not. Post
>> your router and transport. I have some customers who have
>> autoresponder messages longer than 1024 characters and they get sent
>> with no problems on my Exim 4.84 installation.
>
> Hi Todd!
>
> Here the router:
>
> localWrite_gw:
> driver = redirect
> allow_filter
> domains = +local_domains
> user = ${lookup mysql {select case count(*) when 0 then DEFAULT_UID else case uid when 0 then DEFAULT_UID else uid end end from aliases left outer join account using (accountname) join (select case when main_domain is null then domainname else main_domain end as domainname from domain where lower(domainname) = lower('$domain') or lower(main_domain) = lower('$domain') limit 1) dom using (domainname) where (lower(aliasname) = lower('${quote_mysql:$local_part}') or lower(aliasname) = '<catchall>') AND account.active = 1 order by aliasname != '<catchall>' desc, aliasname limit 1}}
> group = exim
> data = ${lookup mysql {select concat('# EXIM Filter\n\n', case when extra_forward is not null then CONCAT(extra_forward, '\n') else '' end, replace(concat(concat(case hasAutoresponder when 0 then '' else replace(replace('if not error_message and \$message_headers does not contain "\\\\nX-SPAM:" and \$message_headers does not contain "\\\\nX-Infected:" then if personal then mail text "%%TEXT%%" from "$local_part@$domain" subject "%%SUBJ%%" extra_headers "MIME-Version: 1.0\\\\nContent-Type: text/plain; charset=ISO-8859-15" endif endif', '%%SUBJ%%', autoresponderSubject), '%%TEXT%%', replace(replace(autoresponderText, '\r', ''), '\n', '\\\\n')) end, '\n\n'), case when filters is not null then concat(filters, "\n", dataHam) else dataHam end), '%%FINALDEST%%', finaldest)) from aliases left join account using (accountname) join (select case when main_domain is null then domainname else main_domain end as domainname from domain where lower(domainname) = lower('$domain') or lower(!
> main_domain) = lower('$domain') limit 1) dom using (domainname) where (lower(aliasname) = lower('${quote_mysql:$local_part}') or lower(aliasname) = '<catchall>') AND account.active = 1 order by aliasname != '<catchall>' desc, aliasname limit 1}}
> redirect_router = loopbackRouter
> reply_transport = autoresponder
> pipe_transport = address_pipe
> file_transport = address_file
> directory_transport = address_file
> headers_remove = ${if def:h_X-DefSubject {Subject}}:X-DefSubject:
> headers_add = ${if def:h_X-DefSubject {Subject: $h_X-DefSubject:}}
> srs = forward
> srs_condition = ${if match {${lookup mysql {SELECT CONCAT(dataHam, CASE WHEN extra_forward IS NOT NULL THEN CONCAT(extra_forward, '\n') ELSE '' END) FROM aliases join account using (accountname) join (select case when main_domain is null then domainname else main_domain end as domainname from domain where lower(domainname) = lower('$domain') or lower(main_domain) = lower('$domain') limit 1) dom using (domainname) where (lower(aliasname) = lower('${quote_mysql:$local_part}') or lower(aliasname) = '<catchall>') AND account.active = 1 order by aliasname != '<catchall>' desc, aliasname limit 1}}} {.*deliver.*} {yes}{no}}
> no_more
>
> and the transport:
>
> autoresponder:
> driver = autoreply
> user = exim
> group = exim
>
> Thank you very much!
>
> Luca Bertoncello
> (lucabert@???)
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/




--
The total budget at all receivers for solving senders' problems is $0.
If you want them to accept your mail and manage it the way you want,
send it the way the spec says to. --John Levine