Virtual Users And Domains With Postfix on Debian Lenny: Quarantine Question

Discussion in 'HOWTO-Related Questions' started by zeus80, Apr 5, 2009.

  1. zeus80

    zeus80 New Member

    Hi all,
    I've configured my mail server using the wonderful Falko how to published on this site (here

    All works ok.
    I'm trying to twaek it and i think i need your help.

    The antispam filter works great exept for the fact that i'm receiving a lot of mails with From: [email protected] To: [email protected]

    Obvoiusly [email protected] is my real mail account.
    The antispam filter put them in quaratine and send me a notification of this type.
    From - Sun Apr 5 20:57:00 2009
    X-Account-Key: account2
    X-UIDL: UID54-1238747624
    X-Mozilla-Status: 0001
    X-Mozilla-Status2: 10000000
    Return-Path: <>
    X-Original-To: [email protected]<hidden>.it
    Delivered-To: [email protected]<hidden>.it
    Received: from localhost (localhost [])
    by mail.<hidden>.it (Postfix) with ESMTP id E913E25808C
    for <[email protected]<hidden>.it>; Sun, 5 Apr 2009 17:42:56 +0200 (CEST)
    Content-Type: multipart/report; report-type=delivery-status;
    Content-Transfer-Encoding: 7bit
    MIME-Version: 1.0
    Subject: Considered UNSOLICITED BULK EMAIL, apparently from you
    In-Reply-To: <[email protected]<hidden>.it>
    Message-ID: <[email protected]<hidden>.it>
    From: "Content-filter at mail.<hidden>.it" <[email protected]<hidden>.it>
    To: <[email protected]<hidden>.it>
    Date: Sun, 5 Apr 2009 17:42:52 +0200 (CEST)

    This is a multi-part message in MIME format...

    Content-Type: text/plain; charset="iso-8859-1"
    Content-Disposition: inline
    Content-Transfer-Encoding: 7bit

    A message from <[email protected]<hidden>.it> to:
    -> [email protected]<hidden>.it

    was considered unsolicited bulk e-mail (UBE).

    Our internal reference code for your message is 14645-20/hD+sBmkJuO43

    The message carried your return address, so it was either a genuine mail
    from you, or a sender address was faked and your e-mail address abused
    by third party, in which case we apologize for undesired notification.

    We do try to minimize backscatter for more prominent cases of UBE and
    for infected mail, but for less obvious cases of UBE some balance
    between losing genuine mail and sending undesired backscatter is sought,
    and there can be some collateral damage on both sides.

    First upstream SMTP client IP address: []
    According to a 'Received:' trace, the message originated at: [], []

    Return-Path: <[email protected]<hidden>.it>
    Message-ID: <[email protected]<hidden>.it>
    Subject: La nostra proposta e interessante per il 68% della popolazione.

    Delivery of the email was stopped!

    Content-Type: message/delivery-status; name="dsn_status"
    Content-Disposition: inline; filename="dsn_status"
    Content-Transfer-Encoding: 7bit
    Content-Description: Delivery error report

    Reporting-MTA: dns; mail.<hidden>.it
    Received-From-MTA: smtp; mail.<hidden>.it ([])
    Arrival-Date: Sun, 5 Apr 2009 17:42:52 +0200 (CEST)

    Original-Recipient: rfc822;[email protected]<hidden>.it
    Final-Recipient: rfc822;[email protected]<hidden>.it
    Action: failed
    Status: 5.7.0
    Diagnostic-Code: smtp; 554 5.7.0 Reject, id=14645-20 - SPAM
    Last-Attempt-Date: Sun, 5 Apr 2009 17:42:52 +0200 (CEST)
    Final-Log-ID: 14645-20/hD+sBmkJuO43

    Content-Type: text/rfc822-headers; name="header"
    Content-Disposition: inline; filename="header"
    Content-Transfer-Encoding: 7bit
    Content-Description: Message header section

    Return-Path: <[email protected]<hidden>.it>
    Received: from ( [])
    by mail.<hidden>.it (Postfix) with SMTP id C715725808B
    for <[email protected]<hidden>.it>; Sun, 5 Apr 2009 17:42:51 +0200 (CEST)
    To: <[email protected]<hidden>.it>
    Subject: La nostra proposta e interessante per il 68% della popolazione.
    From: <[email protected]<hidden>.it>
    MIME-Version: 1.0
    Importance: High
    Content-Type: text/html
    Message-Id: <[email protected]<hidden>.it>
    Date: Sun, 5 Apr 2009 17:42:51 +0200 (CEST)


    Now assuming that i do not send mails to myself from smtp different from mine is there a way to configure postfix/amavis/spamassassin or something to directly delete those messages without sending any notification to my mailbox ?

    p.s. I think i cant use procmail because it do not support virtual configuration so i can't write my ~/.procmailrc file.

    If someone has a solution can please help me ?

    thanks in advance
  2. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure if this can be done, but instead of procmail, you can use maildrop.
  3. jborton

    jborton New Member

    another way

    Here's how I did it, probably easier than procmail or maildrop.

    in postfix

    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
    check_sender_access hash:/etc/postfix/sender_access, (etc)

    in /etc/postfix/sender_access
    domain.tld REJECT You are not me!
    mail.domain.tld REJECT You are not me!

    now anyone who tries to send me email using any address from my own domain is rejected. My own users are either authenticated or on my network, so the third option never gets checked.

Share This Page