Greylisting View Currently Delayed
I don't like ASSP
While it is a great application and does exactly what it is designed to do I don't like using mail proxy services that sit between my mail server and the outside world. I have been waiting for SpamAssassin integration so I can scan email files without having anything sat between the net and my mailserver.
Besides that ASSP has like a myriad of options that I couldn't be bothered to go through. I like simple things like greylisting. 1 tick box and your up and running
While it is a great application and does exactly what it is designed to do I don't like using mail proxy services that sit between my mail server and the outside world. I have been waiting for SpamAssassin integration so I can scan email files without having anything sat between the net and my mailserver.
Besides that ASSP has like a myriad of options that I couldn't be bothered to go through. I like simple things like greylisting. 1 tick box and your up and running
Ok I am guessing you are running MySQL 5 in strict mode?
If that is the case then the SQL line I am using will probably throw an error.
I don't have an SQL5 version to test with so this is off the top of my head.
on line 524 change this line from
to
The above code should be one single line and not wrapped as shown on the forum.
Let me know if this works.
Cheers!
If that is the case then the SQL line I am using will probably throw an error.
I don't have an SQL5 version to test with so this is off the top of my head.
on line 524 change this line from
Code: Select all
$pQuery = mysql_query("INSERT INTO `hm_greylisting_whiteaddresses` VALUES('','{$strIPAddress}','{$strDescription}')") or die(mysql_error());
Code: Select all
$pQuery = mysql_query("INSERT INTO `hm_greylisting_whiteaddresses` (whiteid, whiteipaddress, whiteipdescription) VALUES (NULL, '{$strIPAddress}', '{$strDescription}')") or die(mysql_error());
Let me know if this works.
Cheers!
Re: Greylisting View Currently Delayed
Hi Doom,
Thanks for this excelent script helped me a lot!
Regards
Thanks for this excelent script helped me a lot!
Regards
Last edited by FiShBuRn on 2008-09-12 14:02, edited 1 time in total.
Re: Greylisting View Currently Delayed
You're welcome.
I'm hoping to get some free time soon to update this script to allow users to login to check their own greylisting entries that can be integrated into a web portal or similar. I'll post it up here as and when i get it done
I'm hoping to get some free time soon to update this script to allow users to login to check their own greylisting entries that can be integrated into a web portal or similar. I'll post it up here as and when i get it done
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Code: Select all
$com = new COM("hMailServer.Application");
$com->Connect();
$com->Authenticate("Administrator", "PASSWORD");
$com->Reinitialize();
Re: Greylisting View Currently Delayed
Yes but I didn't want to use the COM API at all
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
In 5.4, the white list won't be cached.Todo : Figure out how to refresh hMail's Whitelist Cache. (Still not done as needs COM access)
Re: Greylisting View Currently Delayed
Sweet. Is there to be any whitelist improvements in 5.4? Per user whitelists perhaps?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Nope, nothing such planned.
Re: Greylisting View Currently Delayed
^Doom^, in the last stable version of hmail the "IP Address's" are showed as "0.0.0.0" can you tell me what i need to change to fix it?
Regards
Regards
Re: Greylisting View Currently Delayed
As far as I am aware no changes have been made to how IP's are stored. Can you post a row from the database for m so I can compare with what's expected. (I assume it has been working fine with previous versions?)
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Yes there is a change in the database, 'glipaddress' is now named 'glipaddress1'.
Just do a search for 'glipaddress' and replace with 'glipaddress1' in the file and everything will work again.
I noticed this and solved this a couple of days ago, after not using your script for awhile and now running newer hmail installation.
Just do a search for 'glipaddress' and replace with 'glipaddress1' in the file and everything will work again.
I noticed this and solved this a couple of days ago, after not using your script for awhile and now running newer hmail installation.
Re: Greylisting View Currently Delayed
Ahh probably to help with IPV6 addition at a later date. Thanks for the heads up joksi
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Yes, it has been working only with 5.3 this appears, i will change the value that joksi suggested.^DooM^ wrote:As far as I am aware no changes have been made to how IP's are stored. Can you post a row from the database for m so I can compare with what's expected. (I assume it has been working fine with previous versions?)
Regards
Edit: it worked
Re: Greylisting View Currently Delayed
i get this warings...
Code: Select all
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\PHPWebAdmin\greylist\greylist.php on line 218
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in C:\Inetpub\wwwroot\PHPWebAdmin\greylist\greylist.php on line 219
Re: Greylisting View Currently Delayed
what version of MySQL are you running?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Mysql 5.1
Re: Greylisting View Currently Delayed
That current section of code just counts how many unique ip's there are in the database. I can only assume some syntax from MySQL4 to 5 has changed when using DISTINCT.
Aside those warnings does the script work?
Aside those warnings does the script work?
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
yes it works fine as i see.
It just doesn't count Total number of unique IP's i think. Because of this.
if you want to check it send a pm and i will show you the page to test it.
It just doesn't count Total number of unique IP's i think. Because of this.
if you want to check it send a pm and i will show you the page to test it.
Re: Greylisting View Currently Delayed
Well i can't see anything wrong with the syntax and i don't have an SQL5 server to test on currently.
You could try altering line 217 from this
to this
However I don't see why this small change would make any difference.
That count doesn't really do anything to be totally honest, you could just remove line 217, 218, 219 and 228 if that change does not work.
You could try altering line 217 from this
Code: Select all
$pQuery = mysql_query("SELECT COUNT(DISTINCT glipaddress) AS numrows FROM `hm_greylisting_triplets`");
Code: Select all
$pQuery = mysql_query("SELECT COUNT(DISTINCT glipaddress) AS 'numrows' FROM `hm_greylisting_triplets`");
That count doesn't really do anything to be totally honest, you could just remove line 217, 218, 219 and 228 if that change does not work.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
i checked the table hm_greylisting_triplets and there is no field glipaddress.
that's all the fields
hm_greylisting_triplets.glid,
hm_greylisting_triplets.glcreatetime,
hm_greylisting_triplets.glblockendtime,
hm_greylisting_triplets.gldeletetime,
hm_greylisting_triplets.glipaddress1,
hm_greylisting_triplets.glsenderaddress,
hm_greylisting_triplets.glrecipientaddress,
hm_greylisting_triplets.glblockedcount,
hm_greylisting_triplets.glpassedcount,
hm_greylisting_triplets.glipaddress2
that's all the fields
hm_greylisting_triplets.glid,
hm_greylisting_triplets.glcreatetime,
hm_greylisting_triplets.glblockendtime,
hm_greylisting_triplets.gldeletetime,
hm_greylisting_triplets.glipaddress1,
hm_greylisting_triplets.glsenderaddress,
hm_greylisting_triplets.glrecipientaddress,
hm_greylisting_triplets.glblockedcount,
hm_greylisting_triplets.glpassedcount,
hm_greylisting_triplets.glipaddress2
Re: Greylisting View Currently Delayed
joksi wrote:Yes there is a change in the database, 'glipaddress' is now named 'glipaddress1'.
Just do a search for 'glipaddress' and replace with 'glipaddress1' in the file and everything will work again.
I noticed this and solved this a couple of days ago, after not using your script for awhile and now running newer hmail installation.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
So first I want to know if, using this script, when I put a register to the whitelist, does the message automaticaly will be delivered ?
I thik greylisting is a nice job, but I´m having a lot of claims with the users for emails not delivered in time. What I want to do is a script that, when the message arrives, the server send an e-mail to the sender asking that he confirms the send maybe typing a confirmation number and if its correct, the message is delivered and then the sender automaticaly goes to the whitelist.
Can you show me the way to do this ?
I thik greylisting is a nice job, but I´m having a lot of claims with the users for emails not delivered in time. What I want to do is a script that, when the message arrives, the server send an e-mail to the sender asking that he confirms the send maybe typing a confirmation number and if its correct, the message is delivered and then the sender automaticaly goes to the whitelist.
Can you show me the way to do this ?
Re: Greylisting View Currently Delayed
You can't do that with this script neither with greylisting. What you want is called challenge response anti spam. This type of anti spam is a royal pain and causes excess un-needed bandwidth usage. There maybe a script to do it somewhere, i can't recall one off the top of my head though.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
I agree that chalenge antispam cause an un-needed bandwidth usage, but I beleave too that the sender must being able to prove yours authenticity.
And second option that I´m thinking about is give to my users a way to see what messages (not only the senders eg) are in greylist and can choose deliver it... It´s less complicated ?
And second option that I´m thinking about is give to my users a way to see what messages (not only the senders eg) are in greylist and can choose deliver it... It´s less complicated ?
Re: Greylisting View Currently Delayed
The problem with challenge/response is automated mailers that send out things like receipts, newsletters, welcome messages, forum verification links etc are never delivered because C/R sends the email back to the sender which 90% of the time is a no-reply account which is never checked, so your users lose out in the end. It's a lame solution to the spam problem in my opinion.
Greylisting is automatic, my script will show you what's delayed waiting for a second try from the sending mail server. Currently it's not very user configurable, i am waiting for a new hmail update that will allow greylist whitelist entries to be added without the cache needing to be re-populated. Also there is a request to add user added whitelist entries too that once added i will be able to update my script to allow users to login check/change/add entries.
Neither of these two solutions are what you are asking for though. Basically you want some kind of delayed queue and if user wants email then they can choose to have it delivered. That seems like a lot of work for the end user. I suggest just enabling greylisting and see how you go. From my own statistics it has stopped around 95% of incoming spam. See this link for my figures http://damnation.org.uk/glist/
Greylisting is automatic, my script will show you what's delayed waiting for a second try from the sending mail server. Currently it's not very user configurable, i am waiting for a new hmail update that will allow greylist whitelist entries to be added without the cache needing to be re-populated. Also there is a request to add user added whitelist entries too that once added i will be able to update my script to allow users to login check/change/add entries.
Neither of these two solutions are what you are asking for though. Basically you want some kind of delayed queue and if user wants email then they can choose to have it delivered. That seems like a lot of work for the end user. I suggest just enabling greylisting and see how you go. From my own statistics it has stopped around 95% of incoming spam. See this link for my figures http://damnation.org.uk/glist/
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
I´m already using Greylisting for 3 months and I receive calls daily with users saying "Somebody send me an e-mail has 1 hour and its not arrives to me"............ And I´m crazying...
I don´t know there but here some e-mails don´t arrives never again... E-mails that I saw in the database and was in greylist but I think that the server don´t try to send again or send very quickly again an the hmail blocks again... I lowered the time to defer delivey atemps to 1 minute to feel how will work however If the user could to liberate the message in greylist will give more years of life...
I don´t know there but here some e-mails don´t arrives never again... E-mails that I saw in the database and was in greylist but I think that the server don´t try to send again or send very quickly again an the hmail blocks again... I lowered the time to defer delivey atemps to 1 minute to feel how will work however If the user could to liberate the message in greylist will give more years of life...
Re: Greylisting View Currently Delayed
The actual email is not stored. hMail delays the email before it is even sent with a 451 delayed code.
http://www.hmailserver.com/forum/viewto ... 20&t=13682
The script above may help some, whenever a user emails someone their mail address is automatically whitelisted. so when they reply it comes through without delay.
http://www.hmailserver.com/forum/viewto ... 20&t=13682
The script above may help some, whenever a user emails someone their mail address is automatically whitelisted. so when they reply it comes through without delay.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
Whats the diference between disable greylisting and automaticaly put incoming senders in the whitelist ?
Re: Greylisting View Currently Delayed
With recipients from local senders being added to the whitelist, when they reply they won't be greylisted. (what the script does)
Greylisting affects ALL incoming mail
Greylisting affects ALL incoming mail
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation
https://www.hmailserver.com/documentation
Re: Greylisting View Currently Delayed
Hi XucruT,
I have similar complaints from users. With my current mail server I just disable greylisting for them & they beg me to turn it back on after they get tons of spam & suddenly they stop complaining so much. hehe (Too bad hMail doesn't have per-user option to disable greylisting but it does allow per domain at least)
Would it be helpful to just whitelist IP's of 'important' senders mail servers then no worries about delays from them? If you trust that server why not add them to whitelist and you get less grief. Take some time to build up whitelist but eventually you'll have good set of common senders you trust.
Btw, so the 'bypass' options in hMail don't help any? You'd think many people use SPF these days & more so have MX/A record although spammers could too so perhaps that allows some more spam but at least maybe it helps cut down on annoying delays.
Bill
I have similar complaints from users. With my current mail server I just disable greylisting for them & they beg me to turn it back on after they get tons of spam & suddenly they stop complaining so much. hehe (Too bad hMail doesn't have per-user option to disable greylisting but it does allow per domain at least)
Would it be helpful to just whitelist IP's of 'important' senders mail servers then no worries about delays from them? If you trust that server why not add them to whitelist and you get less grief. Take some time to build up whitelist but eventually you'll have good set of common senders you trust.
Btw, so the 'bypass' options in hMail don't help any? You'd think many people use SPF these days & more so have MX/A record although spammers could too so perhaps that allows some more spam but at least maybe it helps cut down on annoying delays.
Bill
hMailServer build LIVE on my servers: 5.4-B2014050402
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***
#hmailserver on FreeNode IRC https://webchat.freenode.net/?channels=#hmailserver
*** ABSENT FROM hMail! Those in IRC know how to find me if urgent. ***
Re: Greylisting View Currently Delayed
I am fairly new to php and would like to know how to modify your script to add not the IP address but the sender email to the whitelist.
By the way your script rocks.
Thanks
By the way your script rocks.
Thanks
Re: Greylisting View Currently Delayed
This should do what you need.
I have briefly tested it and it does add the data to the whitelist table. Let me know if you come across any oddities.
Cheers
I have briefly tested it and it does add the data to the whitelist table. Let me know if you come across any oddities.
Cheers
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
This work very good, it adds the information to the database, but it does not appear in the hmailserver administrator.
I even tried to stop and restart the mailserver but nothing.
Any help.
Thanks
I even tried to stop and restart the mailserver but nothing.
Any help.
Thanks
Re: Greylisting View Currently Delayed
This is the same issue as the old script. hMail will not currently pick up changes to the database unless you restart the service or use the COM API to force a refresh. I believe this functionality will be changing in 5.4 where whitelist details are always pulled from the database instead of being cached in memory. 5.4 is hopefully just a few weeks away so until then just restart the service from Start -> Administrative tools -> Services -> hmailserver
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
hey ^DooM^ thanks once again for this script. Now i have one problem, just upgraded to php 5.4.9 and i get this error "PHP Fatal error: Cannot re-assign auto-global variable _POST".
Do you think that is possible to fix this?
Regards
Do you think that is possible to fix this?
Regards
Re: Greylisting View Currently Delayed
Give this version a try and let me know. I believe I fixed the issue.
If at first you don't succeed, bomb disposal probably isn't for you! ヅ
Re: Greylisting View Currently Delayed
wow fast yeap, its fixed! thanks again!!!!
regards
regards