On Thu, Feb 02, 2017 at 04:21:41PM +0300, S�leyman D�zdaban wrote:

> When I send an email from existent-address@mydomain to
> non-existent-address@mydomain postfix redirects email to postmaster.
> I want to reject email to addresses that do not exist in database.

Be specific, what type of domain is "mydomain":

        * Local domain listed in $mydestination?
        * Relay domain listed in $relay_domains?
        * Virtual mailbox domain listed in $virtual_mailbox_domains?
        * Virtual alias domain listed in $virtual_alias_domains?
        * Other, please explain.

Please be very clear whether you're trying to reject mail *to*
non-existent recipients, or *from* non-existent senders.  I am
assuming "recipients" for now based on the above.

> I want to reject email to addresses that do not exist in database.

What database?

> Feb  2 15:25:40 postaci postfix-policyd: rcpt=156749,
>       throttle=update(a), host=5.23.120.20,
>       from=existent-addr...@ankara.edu.tr,
>       to=non-existent-addr...@ankara.edu.tr, size=0/29360128,
>       quota=4800/500000000, count=10/200(26), rcpt=10/200(34),
>       threshold=0%|4%|4%, sasl_username=existent-addr...@ankara.edu.tr

The recipient domain is "ankara.edu.tr"...

> Feb  2 15:25:40 postaci postfix/smtpd[3252]: 4CC4C22359D:
>       client=20.tnd-ortak-120.ankara.edu.tr[5.23.120.20], sasl_method=PLAIN,
>       sasl_username=existent-addr...@ankara.edu.tr

Your connection is authenticated, so mail to "remote" domains will
be permitted.  (Remote means not any of "local", "relay", "virtual alias"
or "virtual mailbox").

> Feb  2 15:25:40 postaci postfix/pipe[129456]: 4CC4C22359D:
>       to=<postmas...@ankara.edu.tr>, 
> orig_to=<non-existent-addr...@ankara.edu.tr>,
>       relay=maildrop, delay=0.08, delays=0.06/0/0/0.02, dsn=2.0.0, status=sent
>       (delivered via maildrop service)

Message bounced to postmaster.

> 2bounce_notice_recipient = postmaster@$mydomain

As configured.

> default_destination_concurrency_limit = 1

This is not recommended.

> disable_dns_lookups = yes

This is wrong for an Internet connected machine unless all outbound
email is via a "relayhost".

> maximal_queue_lifetime = 1d

Perhaps too short.

> mydestination = $myhostname, $mydomain, localhost.$mydomain
> mydomain = cc.ankara.edu.tr
> myhostname = postaci.cc.ankara.edu.tr
> myorigin = $myhostname
> relay_domains =

The domain "ankara.edu.tr" is not any of the above.

> qmgr_message_active_limit = 60000
> qmgr_message_recipient_limit = 60000
> qmgr_message_recipient_minimum = 100
> queue_run_delay = 2h

Very few users set these parameters, you probably shouldn't either.

> relayhost = [80.251.40.57]:25
> smtp_fallback_relay = [80.251.40.58]:25

So you may get away without "dns lookups", but there's no need to
disable DNS explicitly, that's just a source of potential future errors.

> smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated,

No point, empty does the same thing cheaper/faster.

> transport_maps = hash:$config_directory/transport
> virtual_alias_maps = proxy:mysql:$config_directory/maps/sql-valiases.cf

Any domains listed there?  Does the non-existent recipient lookup
key yield some return value in this table with "postmap -q"?

> virtual_mailbox_domains = proxy:mysql:$config_directory/maps/sql-vdomains.cf

Any domains listed there?

> virtual_mailbox_maps = proxy:mysql:$config_directory/maps/sql-vmailboxes.cf

Does the non-existent recipient lookup key yield some return value
in this table with "postmap -q"?

-- 
        Viktor.

Reply via email to