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 http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-debian-lenny).

    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: mymailaddress@mydomain To: mymailaddress@mydomain

    Obvoiusly mymailaddress@mydomain 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
    X-Mozilla-Keys:
    Return-Path: <>
    X-Original-To: filippo@<hidden>.it
    Delivered-To: filippo@<hidden>.it
    Received: from localhost (localhost [127.0.0.1])
    by mail.<hidden>.it (Postfix) with ESMTP id E913E25808C
    for <filippo@<hidden>.it>; Sun, 5 Apr 2009 17:42:56 +0200 (CEST)
    Content-Type: multipart/report; report-type=delivery-status;
    boundary="----------=_1238946176-14645-2"
    Content-Transfer-Encoding: 7bit
    MIME-Version: 1.0
    Subject: Considered UNSOLICITED BULK EMAIL, apparently from you
    In-Reply-To: <20090405154251.C715725808B@mail.<hidden>.it>
    Message-ID: <SShD+sBmkJuO43@mail.<hidden>.it>
    From: "Content-filter at mail.<hidden>.it" <postmaster@mail.<hidden>.it>
    To: <filippo@<hidden>.it>
    Date: Sun, 5 Apr 2009 17:42:52 +0200 (CEST)

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

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

    A message from <filippo@<hidden>.it> to:
    -> filippo@<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: [77.221.75.169]
    ip-77-221-75-169.kava.lt
    According to a 'Received:' trace, the message originated at: [77.221.75.169],
    alinta.net.au ip-77-221-75-169.kava.lt [77.221.75.169]

    Return-Path: <filippo@<hidden>.it>
    Message-ID: <20090405154251.C715725808B@mail.<hidden>.it>
    Subject: La nostra proposta e interessante per il 68% della popolazione.

    Delivery of the email was stopped!

    ------------=_1238946176-14645-2
    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 ([127.0.0.1])
    Arrival-Date: Sun, 5 Apr 2009 17:42:52 +0200 (CEST)

    Original-Recipient: rfc822;filippo@<hidden>.it
    Final-Recipient: rfc822;filippo@<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

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

    Return-Path: <filippo@<hidden>.it>
    Received: from alinta.net.au (ip-77-221-75-169.kava.lt [77.221.75.169])
    by mail.<hidden>.it (Postfix) with SMTP id C715725808B
    for <filippo@<hidden>.it>; Sun, 5 Apr 2009 17:42:51 +0200 (CEST)
    To: <filippo@<hidden>.it>
    Subject: La nostra proposta e interessante per il 68% della popolazione.
    From: <filippo@<hidden>.it>
    MIME-Version: 1.0
    Importance: High
    Content-Type: text/html
    Message-Id: <20090405154251.C715725808B@mail.<hidden>.it>
    Date: Sun, 5 Apr 2009 17:42:51 +0200 (CEST)

    ------------=_1238946176-14645-2--


    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 Howtoforge Staff

    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 main.cf

    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