Category:Sendmail: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
(Die Seite wurde neu angelegt: „Kategorie:KnowHow =Wenn es doch mal nicht ohne Sendmail geht= ==Absender rewrite== In die .mc Datei: <pre> FEATURE(`genericstable')dnl GENERICS_DOMAIN_FILE(`…“)
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Kategorie:KnowHow]]
[[Category:Mail]]
 
=Wenn es doch mal nicht ohne Sendmail geht=
=Wenn es doch mal nicht ohne Sendmail geht=
==Absender rewrite==
In die .mc Datei:
<pre>
FEATURE(`genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')dnl
</pre>
/etc/mail/genericsdomain:
<pre>
src-domain.de
</pre>
Check:
<pre>
# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> $=G
src-domain.de
>
</pre>
/etc/mail/genericstable:
<pre>
# localuser in any genericsdomain -> dst-user@dst-domain.de
localuser  dst-user@dst-domain.de
# any other user @src-domain.de -> default-user@dst-domain.de
@src-domain.de  default-user@dst-domain.de
</pre>
Erzeugen der Übersetzungsdatenbank:
<pre>
# makemap -f hash /etc/mail/genericstable.db < /etc/mail/genericstable
</pre>
Check:
<pre>
# sendmail -bt -d60.1
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags hs
> /try esmtp localuser@src-domain.de
Trying header sender address localuser@src-domain.de for mailer esmtp
canonify          input: localuser @ src-domain . de
Canonify2          input: localuser < @ src-domain . de >
map_lookup(host, src-domain.de) => NOT FOUND (68)
Canonify2        returns: localuser < @ src-domain . de . >
canonify        returns: localuser < @ src-domain . de . >
1                  input: localuser < @ src-domain . de . >
1                returns: localuser < @ src-domain . de . >
HdrFromSMTP        input: localuser < @ src-domain . de . >
PseudoToReal      input: localuser < @ src-domain . de . >
PseudoToReal    returns: localuser < @ src-domain . de . >
MasqSMTP          input: localuser < @ src-domain . de . >
MasqSMTP        returns: localuser < @ src-domain . de . >
MasqHdr            input: localuser < @ src-domain . de . >
map_lookup(generics, localuser@src-domain.de) => NOT FOUND (0)
map_lookup(generics, @src-domain.de) => NOT FOUND (0)
map_lookup(generics, localuser) => dst-user@dst-domain.de (0)
canonify          input: dst-user @ dst-domain . de
Canonify2          input: dst-user < @ dst-domain . de >
map_lookup(host, dst-domain.de) => NOT FOUND (68)
Canonify2        returns: dst-user < @ dst-domain . de >
canonify        returns: dst-user < @ dst-domain . de >
MasqHdr          returns: dst-user < @ dst-domain . de >
HdrFromSMTP      returns: dst-user < @ dst-domain . de >
final              input: dst-user < @ dst-domain . de >
final            returns: dst-user @ dst-domain . de
Rcode = 0, addr = dst-user@dst-domain.de
</pre>
Und beliebige user@src-domain.de:
<pre>
# sendmail -bt -d60.1
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /tryflags hs
> /try esmtp anyuser@src-domain.de
Trying header sender address anyuser@src-domain.de for mailer esmtp
canonify          input: anyuser @ src-domain . de
Canonify2          input: anyuser < @ src-domain . de >
map_lookup(host, src-domain.de) => NOT FOUND (68)
Canonify2        returns: anyuser < @ src-domain . de . >
canonify        returns: anyuser < @ src-domain . de . >
1                  input: anyuser < @ src-domain . de . >
1                returns: anyuser < @ src-domain . de . >
HdrFromSMTP        input: anyuser < @ src-domain . de . >
PseudoToReal      input: anyuser < @ src-domain . de . >
PseudoToReal    returns: anyuser < @ src-domain . de . >
MasqSMTP          input: anyuser < @ src-domain . de . >
MasqSMTP        returns: anyuser < @ src-domain . de . >
MasqHdr            input: anyuser < @ src-domain . de . >
map_lookup(generics, anyuser@src-domain.de) => NOT FOUND (0)
map_lookup(generics, @src-domain.de) => default-user@dst-domain.de (0)
canonify          input: default-user @ dst-domain . de
Canonify2          input: default-user < @ dst-domain . de >
map_lookup(host, dst-domain.de) => NOT FOUND (68)
Canonify2        returns: default-user < @ dst-domain . de >
canonify        returns: default-user < @ dst-domain . de >
MasqHdr          returns: default-user < @ dst-domain . de >
HdrFromSMTP      returns: default-user < @ dst-domain . de >
final              input: default-user < @ dst-domain . de >
final            returns: default-user @ dst-domain . de
Rcode = 0, addr = default-user@dst-domain.de
</pre>

Latest revision as of 08:31, 4 March 2022

Wenn es doch mal nicht ohne Sendmail geht

Pages in category "Sendmail"

This category contains only the following page.