PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : richtige Mailweiterleitung von fetchmail / postfix an Exchange2000-Server



thobro
17.12.04, 21:06
Hallo Leute,

ich hab' bei meinem Netzwerk ein kleineres Problem.
Folgende Konfiguration habe ich erstmal zu Testzwecken aufgebaut:

1. LINUX-Server [SuSE 9.0 professional]
Proxy / MailGateway / Firewall
IP-Adressen: eth0 192.168.200.200 -> dsl0 [extern]
eth1 192.168.100.100 -> intern

2. Windows / Exchange 2000-Server
IP-Adresse: 192.168.100.101 -> intern

3. Windows XP-Client mit Outlook XP
IP-Adresse: 192.168.100.111 -> intern

Die Clients melden sich am W2K an, öffnen Outlook und können über Exchange intern mailen -> klappt alles wunderbar.

Die Clients versenden eine eMail an extern: Der Weg Oultlook -> Exchange -> Postfix (Viren- & Spam-Scan) -> Provider -> klappt auch wunderbar.

Soweit so gut. Jetzt andersherum.

Eingehende eMails: So ist's gedacht.
Provider -> fetchmail -> Postfix (Viren- & Spam-Scan) -> Exchange -> Outlook

Und hier ist der Hacken: Ich kann aus einem MailDrop-Postfach die eMails mit fetchmail abholen. Kein Problem. Sie werden an Postfix zum Scannen weitergeleitet. Auch kein Problem. Aber die eMails landen alle im Exchange-Postfach vom POSTMASTER und werden nicht einsortiert :confused: . Ich weiss hier echt nicht mehr weiter.

Wie krieg ich das jetzt hin, das die eMails in die Exchange-Postfächer einsortiert werden? Weiss jemand Rat?

Hier sind zur Info noch die .fetchmailrc (PS.: die fetchmailrc ist dem Benutzer root zugeordnet):


set no bouncemail
poll post.strato.de
proto pop3
user "catchall"
pass "geheim"
is *
keep
fetchall


dann hier die main.cf:


command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
unknown_local_recipient_reject_code = 450
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = SERVER01.IT-Hilfen.info
program_directory = /usr/lib/postfix
masquerade_domains =
defer_transports =
disable_dns_lookups = no
relayhost = smtp.netcologne.de
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
myorigin = IT-Hilfen.info


und hier jetzt dann die transport:


localhost smtp:[192.168.100.101]
localhost.IT-Hilfen.info smtp:[192.168.100.101]


Die virtual ist leer.

Sollten noch weitere Infos gebraucht werden, sagt bitte Bescheid, ich poste sie dann.

Greetz

Thomas

Stormbringer
17.12.04, 22:50
Gib in der .fetchmailrc doch mal zusätzlich mit an:
is MaxMustermann@192.168.100.101
(Selbstredend ein existierendes Postfach nehmen, und es vorher einfach mal ohne fetchmail testen, bspw. mittels pine.)

Gruß

thobro
17.12.04, 23:28
Hallo Stormbringer,

nette Idee aber wenn ich dann einige Huntert adressen in dieser Form eintragen muss ......

Und dann haben wir eine ziemliche Personalfluktuation (Praktikanten, Studenten, etc.) das wäre dann mehr Arbeit weil ich ja alles doppelt pflegen muss .....

Greetz

Thomas

Terran Marine
18.12.04, 08:41
Morgen,

in der man-page sieht von fetchmail sieht es ja eigentlich recht einfach aus :

---
Here's an example of another kind of multidrop connection:

poll pop.provider.net localdomains loonytoons.org toons.org:
user maildrop with pass secret1 to * here
---

Sind eventuell die Optionen localdomains oder here relevant ?

Grüße
Terran

thobro
19.12.04, 22:14
Hallo Terran,

ich glaube nicht das localdomains und here bei meiner Konstellation eine Bedeutung haben.

Greetz

Thomas

Stormbringer
19.12.04, 22:27
Naja, laut manpage könnten schon ein paar Parameter Bedeutung haben (da ich es aber nicht nutze fische ich da etwas im trüben ... ;-)):


The `aka' option is for use with multidrop mailboxes. It allows you to
pre-declare a list of DNS aliases for a server. This is an optimiza-
tion hack that allows you to trade space for speed. When fetchmail,
while processing a multidrop mailbox, grovels through message headers
looking for names of the mailserver, pre-declaring common ones can save
it from having to do DNS lookups. Note: the names you give as argu-
ments to `aka' are matched as suffixes -- if you specify (say) `aka
netaxs.com', this will match not just a hostnamed netaxs.com, but any
hostname that ends with `.netaxs.com'; such as (say) pop3.netaxs.com
and mail.netaxs.com.

The `localdomains' option allows you to declare a list of domains which
fetchmail should consider local. When fetchmail is parsing address
lines in multidrop modes, and a trailing segment of a host name matches
a declared local domain, that address is passed through to the listener
or MDA unaltered (local-name mappings are not applied).

If you are using `localdomains', you may also need to specify `no enve-
lope', which disables fetchmail's normal attempt to deduce an envelope
address from the Received line or X-Envelope-To header or whatever
header has been previously set by `envelope'. If you set `no envelope'
in the defaults entry it is possible to undo that in individual entries
by using `envelope <string>'. As a special case, `envelope "Received"'
restores the default parsing of Received lines.

Weiterhin:


The words `here' and `there' have useful English-like significance.
Normally `user eric is esr' would mean that mail for the remote user
`eric' is to be delivered to `esr', but you can make this clearer by
saying `user eric there is esr here', or reverse it by saying `user esr
here is eric there'

Also: is = to, 'here' kann angefügt werden

Und:


Here's what a simple retrieval configuration for a multi-drop mailbox
looks like:

poll pop.provider.net:
user maildrop with pass secret1 to golux 'hurkle'='happy' snark here

This says that the mailbox of account `maildrop' on the server is a
multi-drop box, and that messages in it should be parsed for the server
user names `golux', `hurkle', and `snark'. It further specifies that
`golux' and `snark' have the same name on the client as on the server,
but mail for server user `hurkle' should be delivered to client user
`happy'.

Here's an example of another kind of multidrop connection:

poll pop.provider.net localdomains loonytoons.org toons.org:
user maildrop with pass secret1 to * here

This also says that the mailbox of account `maildrop' on the server is
a multi-drop box. It tells fetchmail that any address in the loony-
toons.org or toons.org domains (including subdomain addresses like
`joe@daffy.loonytoons.org') should be passed through to the local SMTP
listener without modification. Be careful of mail loops if you do
this!


Gruß

bla!zilla
20.12.04, 09:52
Du musst Fetchmail schon sagen das der User, für den die Mails abgeholt werden, ein anderer ist. Sonst schreibt Fetchmail die ganzen Headerum und die weitergeleiteten Mails sind auf einmal alle von Root (sofern Fetchmail bei dir mit Root-Rechten läuft).

Wichtig ist die Option "is user01". Dann klappts auch mit dem Exchange. :)

thobro
20.12.04, 14:55
Hallo Leute,

ich habe jetzt fetchmail in verschiedenen Konfigurationen mal laufen lassen. Die Ergebnisse anbei:

Konfiguration 1:
die .fetchmailrc .....


set no bouncemail
poll post.strato.de
proto pop3
user "webmaster@it-hilfen.info"
pass "geheim"
is * here
keep
fetchall


und der entsprechende Auszug aus der fetchmail-Log:


Checking for mail on server(s) with command fetchmail -v -f '/root/.fetchmailrc' ..

fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon Dec 20 14:47:46 2004: poll started
fetchmail: POP3< +OK POP3 server ready <21646941.290.1103550709@post.webmailer.de>
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows:
fetchmail: POP3< EXPIRE NEVER
fetchmail: POP3< PIPELINING
fetchmail: POP3< RESP-CODES
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< IMPLEMENTATION MH/2.7.0b4+MVE
fetchmail: POP3< .
fetchmail: POP3> USER webmaster@it-hilfen.info
fetchmail: POP3< +OK Waiting for password
fetchmail: POP3> PASS
fetchmail: POP3< +OK User logged in, proceed.
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 898
1 message for webmaster@it-hilfen.info at post.strato.de (898 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK 1 message, listing follows
fetchmail: POP3< 1 898
fetchmail: POP3< .
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK message follows
reading message webmaster@it-hilfen.info@post.strato.de:1 of 1 (898 octets)
fetchmail: SMTP< 220 SERVER01.IT-Hilfen.info ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-SERVER01.IT-Hilfen.info
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-XVERP
fetchmail: SMTP< 250 8BITMIME
fetchmail: SMTP> MAIL FROM:<Thomas.Broich@gmx.net> BODY=7BIT SIZE=898
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<postmaster@localhost>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#*fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 Ok: queued as E9E541A67
not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Closing connection
fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon Dec 20 14:47:51 2004: poll completed
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 Bye
fetchmail: normal termination, status 0

.. checking complete.


Die abgeholten eMails landeten alle auf dem ExchangeServer beim Postmaster:

und der entsprechende Auszug aus der mail-Log:


Dec 20 14:47:50 SERVER01 postfix/smtpd[25415]: connect from localhost[127.0.0.1]
Dec 20 14:47:50 SERVER01 postfix/smtpd[25415]: E9E541A67: client=localhost[127.0.0.1]
Dec 20 14:47:51 SERVER01 postfix/cleanup[25417]: E9E541A67: message-id=<9336.1103550608@www13.gmx.net>
Dec 20 14:47:51 SERVER01 postfix/qmgr[25104]: E9E541A67: from=<Thomas.Broich@gmx.net>, size=1341, nrcpt=1 (queue active)
Dec 20 14:47:51 SERVER01 amavis[2392]: (02392-04) ESMTP::10024 /var/spool/amavis/amavis-20041219T175059-02392: <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info> Received: SIZE=1341 BODY=7BIT from SERVER01.IT-Hilfen.info ([127.0.0.1]) by localhost (SERVER01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02392-04 for <postmaster@localhost.IT-Hilfen.info>; Mon, 20 Dec 2004 14:47:51 +0100 (CET)
Dec 20 14:47:51 SERVER01 amavis[2392]: (02392-04) Checking: <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>
Dec 20 14:47:51 SERVER01 postfix/smtpd[25415]: disconnect from localhost[127.0.0.1]
Dec 20 14:47:53 SERVER01 amavis[2392]: (02392-04) spam_scan: hits=0.339 tests=NO_REAL_NAME
Dec 20 14:47:53 SERVER01 amavis[2392]: (02392-04) FWD via SMTP: [127.0.0.1:10025] <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>
Dec 20 14:47:53 SERVER01 postfix/smtpd[25422]: connect from localhost[127.0.0.1]
Dec 20 14:47:53 SERVER01 postfix/smtpd[25422]: 6E21F1A69: client=localhost[127.0.0.1]
Dec 20 14:47:53 SERVER01 postfix/cleanup[25417]: 6E21F1A69: message-id=<9336.1103550608@www13.gmx.net>
Dec 20 14:47:53 SERVER01 postfix/qmgr[25104]: 6E21F1A69: from=<Thomas.Broich@gmx.net>, size=1814, nrcpt=1 (queue active)
Dec 20 14:47:53 SERVER01 amavis[2392]: (02392-04) Passed, <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>, Message-ID: <9336.1103550608@www13.gmx.net>, Hits: 0.339
Dec 20 14:47:53 SERVER01 amavis[2392]: (02392-04) TIMING [total 2390 ms] - SMTP EHLO: 3 (0%), SMTP pre-MAIL: 1 (0%), SMTP pre-DATA-flush: 13 (1%), SMTP DATA: 38 (2%), body hash: 1 (0%), mime_decode: 26 (1%), get-file-type: 14 (1%), decompose_part: 1 (0%), parts: 0 (0%), AV-scan-1: 2033 (85%), SA msg read: 3 (0%), SA parse: 3 (0%), SA check: 82 (3%), fwd-connect: 31 (1%), fwd-mail-from: 3 (0%), fwd-rcpt-to: 4 (0%), write-header: 10 (0%), fwd-data: 0 (0%), fwd-data-end: 114 (5%), fwd-rundown: 2 (0%), unlink-1-files: 7 (0%), rundown: 1 (0%)
Dec 20 14:47:53 SERVER01 postfix/smtp[25419]: E9E541A67: to=<postmaster@localhost.IT-Hilfen.info>, orig_to=<postmaster@localhost>, relay=localhost[127.0.0.1], delay=3, status=sent (250 2.6.0 Ok, id=02392-04, from MTA: 250 Ok: queued as 6E21F1A69)
Dec 20 14:47:53 SERVER01 postfix/smtpd[25422]: disconnect from localhost[127.0.0.1]
Dec 20 14:47:53 SERVER01 postfix/smtp[25419]: 6E21F1A69: to=<postmaster@localhost.IT-Hilfen.info>, relay=192.168.100.101[192.168.100.101], delay=0, status=sent (250 2.6.0 <9336.1103550608@www13.gmx.net> Queued mail for delivery)


Greetz

Thomas


P.S.: Die 2. konfiguration liegt im nächsten Postfing (der Übersichtlichkeit wegen). ;)

thobro
20.12.04, 15:14
Hallo Leute,

und hier jetzt alle Daten nocheinmal in der Konfiguration 2:
die .fetchmailrc .....


set no bouncemail
poll post.strato.de localdomains it-hilfen.info localhost.it-hilfen.info
proto pop3
user "webmaster@it-hilfen.info"
pass "geheim"
is * here
keep
fetchall


und der entsprechende Auszug aus der fetchmail-Log:

Checking for mail on server(s) with command fetchmail -v -f '/root/.fetchmailrc' ..

fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon Dec 20 15:06:27 2004: poll started
fetchmail: POP3< +OK POP3 server ready <26466604.24478.1103551833@post.webmailer.de>
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows:
fetchmail: POP3< EXPIRE NEVER
fetchmail: POP3< PIPELINING
fetchmail: POP3< RESP-CODES
fetchmail: POP3< TOP
fetchmail: POP3< USER
fetchmail: POP3< UIDL
fetchmail: POP3< IMPLEMENTATION MH/2.7.0b4+MVE
fetchmail: POP3< .
fetchmail: POP3> USER webmaster@it-hilfen.info
fetchmail: POP3< +OK Waiting for password
fetchmail: POP3> PASS
fetchmail: POP3< +OK User logged in, proceed.
fetchmail: POP3> STAT
fetchmail: POP3< +OK 1 861
1 message for webmaster@it-hilfen.info at post.strato.de (861 octets).
fetchmail: POP3> LIST
fetchmail: POP3< +OK 1 message, listing follows
fetchmail: POP3< 1 861
fetchmail: POP3< .
fetchmail: POP3> RETR 1
fetchmail: POP3< +OK message follows
reading message webmaster@it-hilfen.info@post.strato.de:1 of 1 (861 octets)
fetchmail: SMTP< 220 SERVER01.IT-Hilfen.info ESMTP Postfix
fetchmail: SMTP> EHLO localhost
fetchmail: SMTP< 250-SERVER01.IT-Hilfen.info
fetchmail: SMTP< 250-PIPELINING
fetchmail: SMTP< 250-SIZE 10240000
fetchmail: SMTP< 250-VRFY
fetchmail: SMTP< 250-ETRN
fetchmail: SMTP< 250-XVERP
fetchmail: SMTP< 250 8BITMIME
fetchmail: SMTP> MAIL FROM:<Thomas.Broich@gmx.net> BODY=7BIT SIZE=861
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> RCPT TO:<postmaster@localhost>
fetchmail: SMTP< 250 Ok
fetchmail: SMTP> DATA
fetchmail: SMTP< 354 End data with <CR><LF>.<CR><LF>
#*fetchmail: SMTP>. (EOM)
fetchmail: SMTP< 250 Ok: queued as 2B3681A8A
not flushed
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Closing connection
fetchmail: 6.2.3 querying post.strato.de (protocol POP3) at Mon Dec 20 15:06:32 2004: poll completed
fetchmail: SMTP> QUIT
fetchmail: SMTP< 221 Bye
fetchmail: normal termination, status 0

.. checking complete.


Die abgeholten eMails landeten alle auf dem ExchangeServer beim Postmaster:

und der entsprechende Auszug aus der mail-Log:


Dec 20 15:06:32 SERVER01 postfix/smtpd[26646]: connect from localhost[127.0.0.1]
Dec 20 15:06:32 SERVER01 postfix/smtpd[26646]: 2B3681A8A: client=localhost[127.0.0.1]
Dec 20 15:06:32 SERVER01 postfix/cleanup[26648]: 2B3681A8A: message-id=<26512.1103551682@www13.gmx.net>
Dec 20 15:06:32 SERVER01 postfix/qmgr[25823]: 2B3681A8A: from=<Thomas.Broich@gmx.net>, size=1304, nrcpt=1 (queue active)
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) ESMTP::10024 /var/spool/amavis/amavis-20041219T175059-02392: <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info> Received: SIZE=1304 BODY=7BIT from SERVER01.IT-Hilfen.info ([127.0.0.1]) by localhost (SERVER01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 02392-05 for <postmaster@localhost.IT-Hilfen.info>; Mon, 20 Dec 2004 15:06:32 +0100 (CET)
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) Checking: <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) cached 68b329da9893e34099c7d8ad5cb9c940 from <Thomas.Broich@gmx.net> (1,1,1)
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) FWD via SMTP: [127.0.0.1:10025] <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>
Dec 20 15:06:32 SERVER01 postfix/smtpd[26651]: connect from localhost[127.0.0.1]
Dec 20 15:06:32 SERVER01 postfix/smtpd[26651]: 8866E1A8C: client=localhost[127.0.0.1]
Dec 20 15:06:32 SERVER01 postfix/smtpd[26646]: disconnect from localhost[127.0.0.1]
Dec 20 15:06:32 SERVER01 postfix/cleanup[26648]: 8866E1A8C: message-id=<26512.1103551682@www13.gmx.net>
Dec 20 15:06:32 SERVER01 postfix/qmgr[25823]: 8866E1A8C: from=<Thomas.Broich@gmx.net>, size=1777, nrcpt=1 (queue active)
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) Passed, <Thomas.Broich@gmx.net> -> <postmaster@localhost.IT-Hilfen.info>, Message-ID: <26512.1103551682@www13.gmx.net>, Hits: 0.339
Dec 20 15:06:32 SERVER01 amavis[2392]: (02392-05) TIMING [total 351 ms] - SMTP EHLO: 2 (1%), SMTP pre-MAIL: 1 (0%), SMTP pre-DATA-flush: 5 (1%), SMTP DATA: 38 (11%), body hash: 1 (0%), mime_decode: 50 (14%), fwd-connect: 28 (8%), fwd-mail-from: 3 (1%), fwd-rcpt-to: 58 (17%), write-header: 10 (3%), fwd-data: 0 (0%), fwd-data-end: 146 (42%), fwd-rundown: 2 (0%), unlink-1-files: 7 (2%), rundown: 1 (0%)
Dec 20 15:06:32 SERVER01 postfix/smtp[26650]: 2B3681A8A: to=<postmaster@localhost.IT-Hilfen.info>, orig_to=<postmaster@localhost>, relay=localhost[127.0.0.1], delay=0, status=sent (250 2.6.0 Ok, id=02392-05, from MTA: 250 Ok: queued as 8866E1A8C)
Dec 20 15:06:32 SERVER01 postfix/smtpd[26651]: disconnect from localhost[127.0.0.1]
Dec 20 15:06:33 SERVER01 postfix/smtp[26652]: 8866E1A8C: to=<postmaster@localhost.IT-Hilfen.info>, relay=192.168.100.101[192.168.100.101], delay=1, status=sent (250 2.6.0 <26512.1103551682@www13.gmx.net> Queued mail for delivery)


Diese eMail landete ebenso beim Postmaster auf dem ExchangeServer

Ich weiss jetzt so langsam echt nicht mehr weiter :confused: .....

Greetz

Thomas

thobro
20.12.04, 15:23
Hallo bla!zilla,


Du musst Fetchmail schon sagen das der User, für den die Mails abgeholt werden, ein anderer ist. Sonst schreibt Fetchmail die ganzen Headerum und die weitergeleiteten Mails sind auf einmal alle von Root (sofern Fetchmail bei dir mit Root-Rechten läuft).

Wichtig ist die Option "is user01". Dann klappts auch mit dem Exchange. :)

Ich hatte die manpage von fetchmail eigentlich so verstanden, dass wenn die Option ... is * ... eingefügt ist, fetchmail die eMails nach den Headerinformationen weiterleitet. Es ist ja meines Erachtens nach Hirnrissig jedesmal wenn ein User wegfällt oder ein neuer hinzukommt auf dem ExchangeServer die fetchmailrc neu anzupassen. Oder sehe ich das falsch?

Die fetchmailrc läuft im Benutzerkontekts des Users root. Ist meines Erachtens nach die beste Lösung wenn man eine Multidrop-Mailbox abfragt.

Greetz

Thomas

thobro
20.12.04, 15:25
Hallo Leute,

es ist mir leider ein kleiner Fehler bei der Konfiguration 2 passiert.

Die eMails werden NICHT an den ExchangeServer weitergeleitet sondern wieder über den SMTP-Server des Providers an das Multidrop-Postfach zurückgeschickt.

Ich hatte vergessen die .fetchmailrc zu speichern. Sorry

Greetz

Thomas

bla!zilla
20.12.04, 15:26
Geht aber nur so, da Fetchmail die Header umschreibt. Wenn du alles als Root abholst und dann weiterschickst, landet alles beim Postmaster weil der Mail-Empfänger der E-Mail root@domain ist. Schau dir mal die Header der Mails an. Und ich gehe nicht davon aus das es einen User mit der E-Mail Adresse root@domain in eurem Exchange-Standort gibt. Daher landet alles beim Postmaster.

thobro
20.12.04, 15:41
Hallo bla!zilla,


Geht aber nur so, da Fetchmail die Header umschreibt. Wenn du alles als Root abholst und dann weiterschickst, landet alles beim Postmaster weil der Mail-Empfänger der E-Mail root@domain ist. Schau dir mal die Header der Mails an. Und ich gehe nicht davon aus das es einen User mit der E-Mail Adresse root@domain in eurem Exchange-Standort gibt. Daher landet alles beim Postmaster.

Doch den User (das Postfach) root gibt es im Exchange. Das habe ich extra angelegt .....

Der Header einer eMail die beim Postmaster landet sieht so aus:


Received: from SERVER01.IT-Hilfen.info ([192.168.100.100]) by server02.IT-Hilfen.Info with Microsoft SMTPSVC(5.0.2195.6713);
Mon, 20 Dec 2004 14:50:09 +0100
Received: from localhost (localhost [127.0.0.1])
by SERVER01.IT-Hilfen.info (Postfix) with ESMTP id 6E21F1A69
for <postmaster@localhost.IT-Hilfen.info>; Mon, 20 Dec 2004 14:47:53 +0100 (CET)
Received: from SERVER01.IT-Hilfen.info ([127.0.0.1])
by localhost (SERVER01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
id 02392-04 for <postmaster@localhost.IT-Hilfen.info>;
Mon, 20 Dec 2004 14:47:51 +0100 (CET)
Received: from localhost (localhost [127.0.0.1])
by SERVER01.IT-Hilfen.info (Postfix) with ESMTP id E9E541A67
for <postmaster@localhost>; Mon, 20 Dec 2004 14:47:50 +0100 (CET)
X-Envelope-From: <Thomas.Broich@gmx.net>
X-Envelope-To: <webmaster@it-hilfen.info>
X-Delivery-Time: 1103550611
Received: from post.strato.de [192.67.198.62]
by localhost with POP3 (fetchmail-6.2.3)
for postmaster@localhost (multi-drop); Mon, 20 Dec 2004 14:47:50 +0100 (CET)
Received: from mail.gmx.net (imap.gmx.net [213.165.64.20])
by mailin.webmailer.de (8.13.1/8.13.1) with SMTP id iBKDoAPK000712
for <webmaster@it-hilfen.info>; Mon, 20 Dec 2004 14:50:10 +0100 (MET)
Received: (qmail 15451 invoked by uid 0); 20 Dec 2004 13:50:08 -0000
Received: from 81.173.255.122 by www13.gmx.net with HTTP;
Mon, 20 Dec 2004 14:50:08 +0100 (MET)
Date: Mon, 20 Dec 2004 14:50:08 +0100 (MET)
From: Thomas.Broich@gmx.net
To: webmaster@it-hilfen.info
MIME-Version: 1.0
Subject: test fetchmail -> postfix -> exchange
X-Priority: 3 (Normal)
X-Authenticated: #609054
Message-ID: <9336.1103550608@www13.gmx.net>
X-Mailer: WWW-Mail 1.6 (Global Message Exchange)
X-Flags: 0001
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Fetchmail-Warning: recipient address webmaster@it-hilfen.info didn't match any local name
X-Virus-Scanned: by amavisd-new at IT-Hilfen.info
Return-Path: Thomas.Broich@gmx.net
X-OriginalArrivalTime: 20 Dec 2004 13:50:09.0640 (UTC) FILETIME=[D2096680:01C4E69A]



Greetz

Thomas

bla!zilla
20.12.04, 15:46
Bereits beim Abrufen der Mails ändert der Fetchmail den Header:


Received: from post.strato.de [192.67.198.62]
by localhost with POP3 (fetchmail-6.2.3)
for postmaster@localhost (multi-drop); Mon, 20 Dec 2004 14:47:50 +0100

Zwar verweisen die Envelope-Zeilen auf den tatsächlichen Empfänger / Absender,



X-Envelope-From: <Thomas.Broich@gmx.net>
X-Envelope-To: <webmaster@it-hilfen.info>


Aber die Mails werden danach schön an den Postmaster weitergeschickt (da abgeholt für "postmaster@localhost").

thobro
20.12.04, 15:48
Hallo bla!zilla,

und wie bringe ich fetchmail das jetzt bei ?
Könntest Du mir eventuell mal eine entsprechende fetchmailrc posten?

Greetz

Thomas

bla!zilla
20.12.04, 15:50
Die Lösung stand hier schon weiter oben.