Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm working on an application which only accepts email coming from the google mail servers. The challenge is, the applications doesn't know, upfront, which domains to accept and so i need Postfix to accept email from all domains.

  • This is the end point for all email, no relaying being done
  • Only accept mail from the Google Apps servers:

    dig txt _spf.google.com | grep spf |format_spf.py > /etc/postfix/network_table
    mynetworks = hash:/etc/postfix/network_table
    smtpd_client_restrictions = permit_mynetworks, reject
    
  • Email not accepted by any local alias is being forwarded to a catch-all user where it is processed by procmail:

    luser_relay = catch-all-user
    mailbox_command = /usr/bin/procmail -Y -a $DOMAIN
    
  • At this point i can't accept mail without a table containing the domains:

    mydestination = hash:/etc/postfix/mydestination_table
    

So, how can i get rid of the "mydestination" table?

Thanks.

share|improve this question
    
Is this a test environment in a closed system? Otherwise how could it possibly be the end point for all email? Am I taking you to literally when you say all email. I'm confused by your first and second bullet point. They seem to cancel each other. –  Patrick R Jan 23 '10 at 15:05
    
Email from Google Apps accounts is being forwarded to this application which extracts and stores the information from the messages. Because i don't know i advance from which Google Apps accounts the emails are coming i need to accept all email coming from the Google Apps servers. –  user32657 Jan 23 '10 at 17:10

1 Answer 1

up vote 1 down vote accepted

You mean you want Postfix to be an open relay?

This could solve this problem:

smtpd_client_restrictions = permit
share|improve this answer
    
Thanks, relay requests from the servers described in 'mynetworks' seem the only ones to be accepted although i don't understand why because i now have two values for smtpd_client_restrictions, 'smtpd_client_restrictions = permit_mynetworks, reject' and 'smtpd_client_restrictions = permit' –  user32657 Jan 23 '10 at 17:15
    
There should be only one smtpd_client_restrictions line with one or more parameters. The parameters can be seen as "policies' that are evaluated in sequence. If you want to see the actual configuration of the running instance of postfix, you can do it via "postconf -d". A smtpd_client_restrictions directive of a public Postfix can be very long (mine hase more than 15 "policies") –  lrosa Jan 23 '10 at 17:58
    
The default setting for 'smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination' must have accepted the relay from hosts in 'mynetworks'. –  user32657 Jan 23 '10 at 22:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.