SuSE Imap-Server
---------------------střih---------------------------------------- # The defer_transports parameter specifies the names of transports # that should not be delivered to unless someone issues "sendmail # -q" or equivalent. Specify zero or more names of mail delivery # transports names that appear in the first field of master.cf). # defer_transports = smtp disable_dns_lookups = yes ---------------------střih----------------------------------------Kromě "disable_dns_lookups = yes" musíte ještě uvést relayhost (mailserver vašeho poskytovatele, který za vás posílá maily přes Internet):
# INTERNET VERSUS INTRANET # # The relayhost parameter specifies the default host to send mail to # when no entry is matched in the optional transport(5) table. When # no relayhost is given, mail is routed directly to the destination. # # On an intranet, specify the organizational domain name. If your # internal DNS uses no MX records, specify the name of the intranet # gateway host instead. # # Specify a domain, host, host:port, [address] or [address:port]. # Use the form [destination] to turn off MX lookups. See also the # default_transport parameter if you're connected via UUCP. # relayhost = [relay.providerserver.de:25]Proveďte aktualizaci běžícího procesu příkazem:
postfix reload
defer_transports
dává podnět postfixu, aby předával poštu pouze na vyzvání.
disable_dns_lookups
znemožňuje name resolving a tím tvorbu spojení.
Vyzvání můžete vytvořit zápisem do souboru crontab a to příkazem crontab -e
(příkaz "sendmail" je programem postfixu):
root@host> crontab -e 0,15,30,45 * * * * /usr/sbin/sendmail -q >/var/log/sendmail.cron.log 2>&1S následujícím doplňkovým řešením Marka Neubauera je možné např. každých 10 minut zjišťovat, zda existuje pošta určená k poslání a teprve poté spustit fetchmail.
# ---------------- Příklad --------------------------- # test the mailq and send if a msg exists if [ "$(mailq)" != "Mail queue is empty" ]; then /usr/bin/fetchmail -a -t 60 -K >> /var/log/fetchmail.log 2>&1 /usr/sbin/sendmail -q if [ "$(mailq)" != "Mail queue is empty" ]; then echo "error in mailq" | sendmail postmaster@localhost fi fi exit 0 # -----------------------------------------------------V adresáři file:/etc/postfix naleznete množství příkladů s popisem všech možných parametrů. Plná dokumentace MTA Postfixu je na adrese file:/usr/doc/packages/postfix/html.