On Tue, Oct 28, 2014 at 01:51:12PM +0000, Jason Staudenmayer wrote:

> Here's the breakdown, this is a fax gateway server with only one
> local user. I'm looking to replicate what I have Qmail doing. Right
> now it will accept all email for the address format
> <fax-#############@aafax.mydomain.com>.

    main.cf:
        # Ideally your Postfix has PCRE support, otherwise use regexp
        #
        retable = pcre:${config_directory}/
        indexed = ${default_database_type}:${config_directory}/

        # Append any other relay domains you need.
        #
        relay_domains =
                aafax.example.com

        # Append any other relay recipient tables
        #
        relay_recipient_maps =
                ${retable}fax.re

        # The above doubles as a transport table, append
        # other transport tables.
        #
        transport_maps = 
                ${retable}fax.re

        # One fax recipient at a time, fax transport cannot
        # atomically enqueue a fax to multiple numbers.
        #
        fax_destination_recipient_limit = 1

    fax.re
        /^fax-[0-9]{13}@aafax\.example\.com$/   fax

    master.cf:
        fax        unix  -       n       n       -       -       pipe
            flags=DRhu
            user=faxuser
            argv=/usr/local/bin/faxscript ${sender} ${mailbox}

The script will get the envelope sender address and the localpart of
the fax email address as arguments.

-- 
        Viktor.

Reply via email to