Disabling Incoming Mails to have Disclaimer

Discussion in 'HOWTO-Related Questions' started by Lawrence Mwangi, Feb 20, 2008.

  1. Lawrence Mwangi

    Lawrence Mwangi New Member

    How to disable Incoming mails from carrying My disclaimer. Right now both Incoming and Outgoing carry the disclaimer. What do i need to do on the /etc/postfix/master.cf or any other file ?
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. Lawrence Mwangi

    Lawrence Mwangi New Member

    Disclaimer Problem

    Falko, thanks for the reply, I have tried to specify the addresses from which the Disclaimer should seek addresses from by creating this file, /etc/postfix/disclaimer_addresses and ammending the /etc/postfix/disclaimer as instructed.
    However this is the error i get

    "/etc/postfix/disclaimer". Command output: /etc/postfix/disclaimer:
    > line 22: -m: command not found cut: the delimiter must be a single
    > character Try `cut --help' for more information. cut: the delimiter must
    > be a single character Try `cut --help' for more
    > information. /etc/postfix/disclaimer:
    > line 35: syntax error: unexpected end of file
    >
    > AND THE LINE AT /etc/postfix/disclaimer which brings the error is this one
    >
    >
    > #from_address=´grep -m 1 ¨From:¨ in.$$ | cut -d ¨<¨ -f 2 | cut -d ¨>¨ -f 1´
    >
    > #if [ ´grep -wi ^${from_address}$ ${DISCLAIMER_ADDRESSES}´ ]; then

    any Help?
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Please copy the script from the tutorial and paste it into /etc/postfix/disclaimer. Then try again.
     
  5. Lawrence Mwangi

    Lawrence Mwangi New Member

    Disclaimer

    Progress noted thanks, I have done a copy and paste from the tutorial but am getting this error

    "/etc/postfix/disclaimer". Command output: /etc/postfix/disclaimer: line
    39: syntax error: unexpected end of file

    when I vi +39 /etc/postfix/disclaimer it takes me to line 38 which actually is the last command i.e. exit $?

    I have re-done this several times with the same result, where i am going wrong?
     
  6. topdog

    topdog New Member HowtoForge Supporter

    Try adding a new line at that point.
     
  7. Lawrence Mwangi

    Lawrence Mwangi New Member

    Disclaimer

    Adding a line even a comment simply takes the syntax error to the next line i.e.
    line 40 while the previous was at 39.
    40: syntax error: unexpected end of file

    I have recopied the disclaimer file and not edited even a single line. I may be closer to a the solution as right now i dont have that any anymore NOR I dont have the Disclaimer neither on Outgoing or Incoming. See the Logs as i have noted that initially the mail passes thru dfilt before being handed over to the SMTP. Any help? (actual domains changed)

    Feb 27 09:30:27 mail postfix/qmgr[3781]: ADC64760947: from=<[email protected]>, size=1184, nrcpt=1 (queue active)
    Feb 27 09:30:27 mail postfix/smtpd[3790]: disconnect from mail.xyz.com[127.0.0.1]
    Feb 27 09:30:27 mail imap-login: Login: test [127.0.0.1]
    Feb 27 09:30:27 mail postfix/pipe[3793]: ADC64760947: to=<[email protected]>, relay=dfilt, delay=0, status=sent (mail.xyz.com)
    Feb 27 09:30:27 mail postfix/qmgr[3781]: ADC64760947: removed
    Feb 27 09:30:27 mail postfix/pickup[3780]: D0F88760947: uid=406 from=<[email protected]>
    Feb 27 09:30:27 mail postfix/cleanup[3792]: D0F88760947: message-id=<[email protected]>
    Feb 27 09:30:27 mail postfix/qmgr[3781]: D0F88760947: from=<[email protected]>, size=1306, nrcpt=1 (queue active)
    Feb 27 09:30:28 mail imap-login: Login: test [127.0.0.1]
    Feb 27 09:30:42 mail postfix/smtp[3993]: D0F88760947: to=<[email protected]>, relay=mailout.abckenya.com[80.240.192.17], delay=15, status=sent (250 2.0.0 Ok: queued as C4D48406A9F)
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Please make sure that /etc/postfix/disclaimer contains Unix linebreaks, not Windows linebreaks. If you edit the file on Windows, please make sure you use an editor that can save the file with Unix linebreaks.
     
  9. Lawrence Mwangi

    Lawrence Mwangi New Member

    Disclaimer

    Falko , thanks so far for your contribution and that of topdog, am fully using linux Suse 10.2 and whatever am editing on the linux box is running on Centos, I dont think am using any windows related OS, (i stand to be corrected).
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Then I have no idea what's wrong. But I don't seem to be the only one who always has problems with SUSE... ;)
     
  11. Lawrence Mwangi

    Lawrence Mwangi New Member

    Disclaimer

    I have dug out this line in view of the mails both in/outgoing carrying the disclaimer.
    <incoming ip>:smtp inet n - y - - smtpd
    <outgoing ip>:smtp inet n - y - - smtpd
    -o content_filter=dfilt:

    AM told its meant to let just ougoing mails carry the disclaimer, however how do i edit it?
    >Will incoming ip be a private IP and Outgoing the Public?
    Please Help! and Falko and Team its a great job u doing out there, thanks.
     
  12. topdog

    topdog New Member HowtoForge Supporter

    Is the public ip attached to the machine ? if so then use the public ip.
     

Share This Page