HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Notification on new email to external email adress? (http://www.howtoforge.com/forums/showthread.php?t=55942)

archbird 26th January 2012 17:14

Notification on new email to external email adress?
 
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!

till 26th January 2012 17:35

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.

archbird 27th January 2012 13:34

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?

till 27th January 2012 13:49

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.

archbird 27th January 2012 17:12

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?

till 27th January 2012 17:20

Quote:

What's the maildroops from adress?
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.


All times are GMT +2. The time now is 22:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.