Help block send mail in zimbra
Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Help block send mail in zimbra

  1. #1
    Active Member
    Join Date
    Aug 2014
    Posts
    7

    Help block send mail in zimbra

    Hello every body! Help me, please!

    I using Zimbra, I want create policy "all account in domain do not send mail to example@gmail.com".

    Can you help me, thank you!

  2. #2
    ZeXtras Employee ZeXtras ResellerZeXtras Employee Merovingian's Avatar
    Join Date
    Oct 2013
    Location
    /MilkyWay/SolarSystem/Earth
    Posts
    2
    Hello biitc,

    welcome to our community forums! ;-)

    First of all, Zimbra runs on top of Postfix daemon, so, like any other Postfix-based system, you can define your own policies using transport maps.

    May i ask you which version of Zimbra is running on your server?

    Greetings
    Brando

  3. #3
    Active Member
    Join Date
    Aug 2014
    Posts
    7
    Hello Brando,

    Thank you for reply

    I'm from Việt Nam, Sory because speak my english is not good.

    I using Zimbra version: "Release 8.0.7_GA_6021.RHEL6_64_20140408123911 RHEL6_64 FOSS edition"

    I have 50 user of my system, I want to set policy: I don't want all user send mail to only mail external. Example: "example@gmail.com"

    Thanks!

  4. #4
    CTO ZeXtras Employee d0s0n's Avatar
    Join Date
    Apr 2011
    Posts
    565
    Hi biitc,

    you can just add a new postfix transport file and tell at zimbra to use it:

    1) create a file like this:
    Code:
    ~$ cat /opt/zimbra/conf/postfix_transport
    example@gmail.com    error:Your Access error message
    blockedDomain.com    error:Your Access error message
    2) Check zimbra local transport setting:
    Code:
    ~$ zmlocalconfig postfix_transport_maps
    postfix_transport_maps = ldap:/opt/zimbra/conf/ldap-transport.cf
    3) Create the .db file
    Code:
    postmap /opt/zimbra/conf/postfix_transport
    4) Then change the same zimbra local setting to add the new file:
    Code:
    ~$ zmlocalconfig -e postfix_transport_maps="hash:/opt/zimbra/conf/postfix_transport,ldap:/opt/zimbra/conf/ldap-transport.cf"
    ...after 1 or 2 minutes, the zmconfigd component will reconfigure postfix for you
    Just take a look at /var/log/zimbra.log to see the changing.


    Have a nice day.
    D0s0n
    Last edited by Cine; 01-22-2015 at 01:54 PM. Reason: Added .db file creation command
    ZeXtras Website # ZeXtras Wiki # ZeXtras Store

    Head of ZeXtras System Administrators

  5. #5
    Active Member
    Join Date
    Aug 2014
    Posts
    7
    Hi Brando,

    I have followed your instructions, but now, i don't send email all email to external, please help me rollback config, help me, it is important for me.

    Thank you!

  6. #6
    Active Member
    Join Date
    Aug 2014
    Posts
    7
    Sorry Brando,

    I have restored configurations.

    I have followed your instructions:

    Vim /opt/zimbra/conf/postfix_transport

    example@gmail.com error:Your Access error message
    #blockedDomain.com error:Your Access error message (I don't want block domain)
    Late I like your configured, but I send test mail to external (example@gmail.com) not receive, and test all user was also similar.

    Current I have restored configurations.

    Please help me. I don't want all user send mail to "only email". Example: "example@gmail.com"

    Thank you very much!

    Nice day Brando

  7. #7
    CTO ZeXtras Employee d0s0n's Avatar
    Join Date
    Apr 2011
    Posts
    565
    I'm not Brando

    ...and without any error log I cannot help you.

    D0s0n
    ZeXtras Website # ZeXtras Wiki # ZeXtras Store

    Head of ZeXtras System Administrators

  8. #8
    Active Member
    Join Date
    Aug 2014
    Posts
    7
    Oh Sory, I was confused, ....

    Hello D0s0n, thank you for reply,

    Log my server mail Zimbra /var/log/zimbra.log

    Aug 22 08:34:25 zimbra postfix/cleanup[12232]: BF6EC101540: message-id=<001501cfbda9$37d7dc90$a78795b0$@mydomain.com>
    Aug 22 08:34:25 zimbra postfix/qmgr[22206]: BF6EC101540: from=<phong.dao@mydomain.com>, size=5365, nrcpt=2 (queue active)
    Aug 22 08:34:25 zimbra postfix/smtp[12236]: 96AA3101543: to=<biitcvh@gmail.com>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.21, delays=0.14/0.01/0.02/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BF6EC101540)
    Aug 22 08:34:25 zimbra postfix/smtp[12236]: 96AA3101543: to=<pqdung2012@gmail.com>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.21, delays=0.14/0.01/0.02/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BF6EC101540)
    Aug 22 08:34:25 zimbra postfix/smtp[12236]: 96AA3101543: to=<pqdung2012@gmail.com>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.21, delays=0.14/0.01/0.02/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BF6EC101540)
    Aug 22 08:34:25 zimbra postfix/amavisd/smtpd[12237]: disconnect from localhost[127.0.0.1]
    I see:

    - Me: phong.dao@mydomain.com send only address mail to biitcvh@gmail.com, Server Mail auto send an email to pqdung2012@gmail.com. I don't now email pqdung2012@gmail.com and I wan't block email pqdung2012@gmail. This situation happens to all users on my Server.

    Thanks you very much!

  9. #9
    CTO ZeXtras Employee d0s0n's Avatar
    Join Date
    Apr 2011
    Posts
    565
    Hi biitc,

    I don't see any error on your log, it seems that someone have configured this behaviour (something like this or a simple forwarding setting on user preferences).
    So if you don't have set this configuration, someone has compromised your server and the changing of a postifix policies to limit an incorrect configuration is not the right way.
    Are you the sysadmin of this server?

    D0s0n
    ZeXtras Website # ZeXtras Wiki # ZeXtras Store

    Head of ZeXtras System Administrators

  10. #10
    Active Member
    Join Date
    Aug 2014
    Posts
    7
    Hi d0s0n,

    Thanks you, I think about that, but i don't know how to fix it, because I used it for the first time.

    Log after send any email

    Aug 22 21:44:35 zimbra postfix/cleanup[32206]: 9580310153A: message-id=<005601cf be17$974a06d0$c5de1470$@ttvonline.com.vn>
    Aug 22 21:44:35 zimbra postfix/qmgr[22206]: 9580310153A: from=<phong.dao@ttvonli ne.com.vn>, size=5368, nrcpt=2 (queue active)
    Aug 22 21:44:35 zimbra postfix/smtp[32210]: 70874101543: to=<biitcvh@gmail.com>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.26, delays=0.13/0.01/0.02/0.11, dsn=2 .0.0, status=sent (250 2.0.0 Ok: queued as 9580310153A)
    Aug 22 21:44:35 zimbra postfix/smtp[32210]: 70874101543: to=<pqdung2012@gmail.co m>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.26, delays=0.13/0.01/0.02/0.11, ds n=2.0.0, status=sent (250 2.0.0 Ok: queued as 9580310153A)
    Aug 22 21:44:35 zimbra postfix/smtp[32210]: 70874101543: to=<pqdung2012@gmail.co m>, relay=127.0.0.1[127.0.0.1]:10025, delay=0.26, delays=0.13/0.01/0.02/0.11, ds n=2.0.0, status=sent (250 2.0.0 Ok: queued as 9580310153A)
    Aug 22 21:44:35 zimbra postfix/amavisd/smtpd[32211]: disconnect from localhost[1 27.0.0.1]
    Aug 22 21:44:35 zimbra postfix/qmgr[22206]: 70874101543: removed
    Aug 22 21:44:37 zimbra postfix/smtps/smtpd[32202]: disconnect from unknown[42.11 8.32.92]
    Aug 22 21:44:40 zimbra postfix/smtp[32210]: 9580310153A: to=<biitcvh@gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.72.27]:25, delay=5.2, delays=0.11/0/1. 2/3.8, dsn=2.0.0, status=sent (250 2.0.0 OK 1408718680 ae8si30251971pad.190 - gs mtp)
    Aug 22 21:44:40 zimbra postfix/smtp[32210]: 9580310153A: to=<pqdung2012@gmail.co m>, relay=gmail-smtp-in.l.google.com[173.194.72.27]:25, delay=5.2, delays=0.11/0 /1.2/3.8, dsn=2.0.0, status=sent (250 2.0.0 OK 1408718680 ae8si30251971pad.190 - gsmtp)
    And report mail for admin

    Capture.JPG

    Email "pqdung2012@gmail.com" I don't know but He received a lot of emails from my email server. I want to block it.

    I think someone has invaded my system, you can help me, please.

    Yes, I am sysadmin of this server

    Thank you very much!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •