Loading ...
Sorry, an error occurred while loading the content.
 

Re: Restrict sending to specific domains only.

Expand Messages
  • Lunar_Lamp
    ... Thanks for the swift reply. Assuming that I change the webapp to send via smtp, would my configuration be expected to work?
    Message 1 of 3 , Jul 28, 2010
      On 28/07/10 14:03, Brian Evans - Postfix List wrote:
      > On 7/28/2010 8:53 AM, Lunar_Lamp wrote:
      >> My aim is to restrict a web application from sending to any domains
      >> other than those specifically allowed. Obviously, by default postfix
      >> is allowing me to send to all domains. However, I have not been able
      >> to restrict - all domains are still sent to.
      >>
      >> All emails are sent from the same email address (excerpt from
      >> maillogs - apologies to those who dislike obfuscated domains):
      >>
      >> logs:
      >> #### snip ####
      >> Jul 28 09:13:04 rt1 postfix/pickup[3465]: 57BF616180B2: uid=48
      >> from=<apache>
      >> Jul 28 09:13:04 rt1 postfix/cleanup[3545]: 57BF616180B2:
      >> message-id=<rt-3.8.7-14324-1280308384-91.4989-15-0@...>
      >> Jul 28 09:13:04 rt1 postfix/qmgr[12167]: 57BF616180B2:
      >> from=<apache@...>, size=1181, nrcpt=1
      >> (queue active)
      >> #### snip ####
      >>
      >> I added the following lines to my main.cf to achieve my aims:
      >> #### snip ####
      >> smtpd_recipient_restrictions = check_sender_access
      >> hash:/etc/postfix/restricted_senders
      >> smtpd_restriction_classes = allowed_only
      >> allowed_only = check_recipient_access
      >> hash:/etc/postfix/allowed_domains, reject
      >> #### snip ####
      > Your webapp is submitting mail via the sendmail(1) command
      >
      > smtpd restrictions apply to mail arriving via smtpd only.
      >
      > To get the result you want, you must change your webapp to either: 1)
      > restrict the emails; 2) submit via smtp

      Thanks for the swift reply. Assuming that I change the webapp to send
      via smtp, would my configuration be expected to work?
    Your message has been successfully submitted and would be delivered to recipients shortly.