Help with Greylistd, keeps greylists people using the server to send mail

dwilko

Verified User
Joined
Sep 7, 2005
Messages
57
Hi

We have put greylistd on our server its greylisting incoming mail fine, however when sending email from the a mail account via the mail server its greylisting it

for example

user creates email in outlook and hits send, the send and receive box pops up and says there was an error sending email and the error message is the greylist one then once outlook as retried again few times it sends

is there away to stop it from greylisting outgoing mail?

Thanks

David
 
You have to correctly configure your mail server.

Usually users are able to use your SMTP server to send emails only because they are authorized to relay (by SMTP authentication, or by using an internal IP address for ISPs).
This is probably what's missing in your exim.conf (IF your are using exim), just after the "defer" line of the greylisting rule:
Code:
!hosts = +relay_hosts

For information, here is my greylist config, using debian's greylistd:
Code:
# GREYLIST
  defer message = $sender_host_address is not yet authorized to deliver \
                  mail from <$sender_address> to <$local_part@$domain>. \
                  Please try later.
  log_message = greylisted.
  !hosts = +relay_hosts : \
  ${if exists {/etc/greylistd/whitelist-hosts}\
  {/etc/greylistd/whitelist-hosts}{}} : \
  ${if exists {/var/lib/greylistd/whitelist-hosts}\
  {/var/lib/greylistd/whitelist-hosts}{}}
  domains = +relay_domains
  !senders = : postmaster@*
  set acl_m6 = $sender_host_address $sender_address $local_part@$domain
  set acl_m6 = ${readsocket{/var/run/greylistd/socket}{$acl_m6}{5s}{}{false}}
  condition = ${if eq {$acl_m6}{grey}{true}{false}}
 
Hi

Its setup for SMTP Authorization, users cant send mail with out providing their email login details

This is what my greylist conf in the exim.conf looks like


Code:
# Perform greylisting.

    defer message 	= $sender_host_address is greylisted. Please try again later.
	log_message 	= greylisted.
	domains 	= +relay_domains : +local_domains
	!senders 	= : postmaster@*
	!hosts          = : +relay_hosts : \
			    ${if exists {/etc/greylistd/whitelist-hosts}\
                	    {/etc/greylistd/whitelist-hosts}{}} : \
			    ${if exists {/etc/virtual/whitelist-hosts}\
                	    {/etc/virtual/whitelist-hosts}{}}
                	    
	verify         	= recipient/callout=5s,use_sender,defer_ok
	condition      	= ${readsocket{/var/run/greylistd/socket}\
	                   {--grey $sender_host_address $sender_address $local_part@$domain}{5s}{}{false}}


Thanks
 
Your config seems just fine, you probably broke something elsewhere.

I suggest you print the relay_hosts array somehow and see if your client host is there.
I never debugged exim at that level, so I'm not able to help, sorry.
 
Hi

I think I have found the problem, looking it it more the problem seemed to be sending mail to a domain on the same server, Looking at your config it looks like this line could be why

Mine
Code:
domains 	= +relay_domains : +local_domains

Yours
Code:
 domains 	= +relay_domains

so I think its the +local_domains
cant test it at the moment as it looks like another problem with greylistd has popped up

Thanks

David
 
Hi

Fixed the other problem and its now working again, I am now testing with removing the "+local_domains" like your config is

will see how it goes

Regards

David
 
Back
Top