Emails automatisch versenden & abholen
Hallo Linux-Freaks, ich habe ein kleines Bash-Script geschrieben, daß per Fetchmail Emails von 5 Accounts abholt und anschliessend via Sendmail alle im Queue versendet. Das Email ist über einen seperaten ISDN-Router ans Netzwerk angeschlossen, eine Flatrate lohnt sich nicht. Auf einem zentralen Linux-Fileserver ist auch Fetchmail/sendmail installiert, der alle Emails sammelt und versendet. Die Pop3 Accounts, die abgefragt werden, sind über Pop-before-SMTP gesichert. Wenn ich nun via Webmin in der Sendmail-Konfiguration einstelle, daß er die Emails im "Background", also immer dann wenn eine Email versendet vom Client an den lokalen Linux Server verschickt wird, versenden soll, dann bekomme ich den Fehler "Relaying Denied", der vom Remote Server kommt und bedeutet, daß man die Emails zuerst mit Pop3 abholen soll, bevor man welche verschickt. Cron sorgt übrigens dafür, daß das shellscript, welches die Emails abholt und dann verschickt automatisch alle 15 Minuten ausgeführt wird. Wie kann ich einstellen, daß der Server bei jedem eintreffen einer Email zuerst via fetchmail die Emails holt und anschliessend erst alle im queue versendet? Dankeschön
Moin, Deine Zeilen sind zu lang. * Sascha Teifke <linux@opaia.de> [01-09-15 13:44]:
ich habe ein kleines Bash-Script geschrieben, daß per Fetchmail Emails von 5 Accounts abholt und anschliessend via Sendmail alle im Queue versendet. Das mache ich alles mit Fetchmail, auch die aktivierung des MTA.
Die Pop3 Accounts, die abgefragt werden, sind über Pop-before-SMTP gesichert. Cron sorgt übrigens dafür, daß das shellscript, welches die Emails abholt und dann verschickt automatisch alle 15 Minuten ausgeführt wird. Das kannst Du erreichen, indem Du folgende fetchmail.rc anlegst:
set daemon 300 poll dein.provider.de protocol pop3 user remoteUser is localUser password geheim fetchall nokeep postconnect 'sendmail -q' - - - Es gibt vielleicht noch andere nützliche Optionen, sieh Dir mal die Dokumentation von Fetchmail an. Thorsten -- The problems that exist in the world today cannot be solved by the level of thinking that created them. - Albert Einstein
participants (2)
-
Sascha Teifke
-
Thorsten Haude