Notification on new email to external email adress?

Discussion in 'Installation/Configuration' started by archbird, Jan 26, 2012.

  1. archbird

    archbird New Member

    Hello,

    Im running Ubuntu and ISPConfig3.

    I have a mailbox, and I want to send a notification email to a external email adress when that email box have a new email. Something like "You got a new email login to user@domain.com to read it".

    For what I understand I need to use procmail to achieve this. But how do I setup that script?

    Since its vmail all accounts are in /var/vmail/domain.com/user

    Is this where I should put the script file, or where do I put it? Also how do I activate it?

    I cant seem to find any useful guides with the setup ubuntu + ispconfig3 + vmail

    Also, another question, how do I make the script to only send a notification if the new email is a good email, and not for example spam mails (assume i somehow ignore mails with ***SPAM*** in the title)?

    Thankful for some tips and help!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    procmail is not used on a ispconfig 3 server and you dont have to create any script files manually. The mail filtering language is either sieve (if you use dovecot) or maildrop ( if you use courier). The filter script can be inserted into the custom filter field in the mailbox settings in ispconfig. You will find a lot of examples for both filtering languages if you search in google.
     
  3. archbird

    archbird New Member

    Thank you! That was easier than I thought.

    But I have a problem still. When i send the notification to another mail-adress on my server it works as it should, but when I try to send it to a external (gmail.com) adress it doesnt work. Any ideas what i need to do to get it to work to a external adress?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It should not matter if its a internal or external address. You might want to check the mail log if you get any errors there, maybe it is blocked by the spamfilter on your server or a spamfilter on the external server.
     
  5. archbird

    archbird New Member

    I found out it's probably blocked by gmails server. If i use a hotmail adress it works, but it gets marked as spam.

    So it's something wrong in my configuration somewhere that makes them belive its spam/bad email.

    My mails is not treated as spam if i send from mymailbox@mydomain.com, but it is treated as spam when maildrop sends it.

    What's the maildroops from adress? Is it root@mydomain.com or something else?

    I'll double check my domain SPF record, but it would be good to know the difference between maildrops email, and a regular email from mymailbox@mydomain.com?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yous should be able to see that in the headers of the email that you received at hotmail. In general you should chacke that the reverse dns record for your server IP exists and that it matches with the hostnname of your server. Beside that, the hostanme of your server has to exist in dns as well.
     

Share This Page