Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Postfix Documentation
Previous Page Home Next Page

Postfix on a dialup machine

This section applies to dialup connections that are down most of the time. For dialup connections that are up 24x7, see the local area network section above.

This section presents additional configuration. You need to combine this with basic configuration information as discussed the first half of this document.

If you do not have your own hostname and IP address (usually with dialup, cable TV or DSL connections) then you should also study the section on " Postfix on hosts without a real Internet hostname".

  • Route all outgoing mail to your network provider.

    If your machine is disconnected most of the time, there isn't a lot of opportunity for Postfix to deliver mail to hard-to-reach corners of the Internet. It's better to give the mail to a machine that is connected all the time. In the example below, the [] prevents Postfix from trying to look up DNS MX records.

    /etc/postfix/
    main.cf:
        
    relayhost = [smtprelay.someprovider.com]
    
  • Disable spontaneous SMTP mail delivery (if using on-demand dialup IP only).

    Normally, Postfix attempts to deliver outbound mail at its convenience. If your machine uses on-demand dialup IP, this causes your system to place a telephone call whenever you submit new mail, and whenever Postfix retries to deliver delayed mail. To prevent such telephone calls from being placed, disable spontaneous SMTP mail deliveries.

    /etc/postfix/
    main.cf:
        
    defer_transports = smtp (Only for on-demand dialup IP hosts)
    
  • Disable SMTP client DNS lookups (dialup LAN only).

    /etc/postfix/
    main.cf:
        
    disable_dns_lookups = yes (Only for on-demand dialup IP hosts)
    
  • Flush the mail queue whenever the Internet link is established.

    Put the following command into your PPP or SLIP dialup scripts:

    /usr/sbin/sendmail -q (whenever the Internet link is up)
    

    The exact location of the Postfix sendmail command is system-specific. Use the command "postconf sendmail_path" to find out where the Postfix sendmail command is located on your machine.

    In order to find out if the mail queue is flushed, use something like:

    #!/bin/sh
    
    # Start mail deliveries.
    /usr/sbin/sendmail -q
    
    # Allow deliveries to start.
    sleep 10
    
    # Loop until all messages have been tried at least once.
    while mailq | grep '^[^ ]*\*' >/dev/null
    do  
        sleep 10
    done
    

    If you have disabled spontaneous SMTP mail delivery, you also need to run the "sendmail -q" command every now and then while the dialup link is up, so that newly-posted mail is flushed from the queue.

Postfix Documentation
Previous Page Home Next Page