summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
AgeCommit message (Collapse)Author
2009-01-04- remove runstates global, we don't need it actually.Gilles Chehade
- while at it, move the runner states check a bit earlier.
2009-01-04make sure runner resets scheduling related flags on envelopes when theGilles Chehade
queue is processed for the first time since a (re)start. this ensures that deliveries scheduling can recover properly in case of a badly timed shutdown. ok jacekm@
2009-01-04- runner is now capable of pausing/resuming the scheduling of deliveriesGilles Chehade
for both mda and mta batches. - smtpctl can be used to disable/enable deliveries at runtime using the pause/resume commands. ok jacekm@
2009-01-04remove unnecessary "messagep->retry == 255" expiry condition; ok gilles@Jacek Masiulaniec
2009-01-04kill F_MESSAGE_EXPIRED; ok gilles@Jacek Masiulaniec
2009-01-04fix bug where runner would expire message that is being delivered,Jacek Masiulaniec
leading to double unlink on envelope file; ok gilles@
2009-01-04When matching a recipient domain to a rule, do not use strcasecmp, but useGilles Chehade
new hostname_match() function which recognizes * as a wildcard. We can now do: accept for domain "*.example.org" to match all subdomains. idea from Nicholas Marriott <nicholas.marriott@gmail.com>, hostname_match() from me in place of his fnmatch() calls. ok jacekm@
2009-01-04- change name of "masked" member in struct netaddr, it was misleadingGilles Chehade
- allow "from all" so that the ugly "accept from { 0.0.0.0/0, ::/0 }" construct becomes a nice looking "accept from all" ok jacekm@
2009-01-04cleanup; ok gilles@Jacek Masiulaniec
2009-01-04aliases/forwards expansion was not done correctly and a race couldGilles Chehade
cause delivery to happen before expansion is over, causing some of the recipients to never receive the mail. change how the mfa, lka, queue and smtp processes communicate to ensure smtp never receives an acknowledgment before ALL expanded envelopes are on disk. While at it, lka was doing work which belongs in mfa, fix that also. this is based on an idea from a talk with jacekm@, change not over but already better than what we had.
2009-01-02fix T_DAEMON_MESSAGE notices delivery; ok gilles@Jacek Masiulaniec
2009-01-02cleanup queue_load_envelope; ok gilles@Jacek Masiulaniec
2009-01-01remove unnecessary includes; ok gilles@Jacek Masiulaniec
2008-12-31if mkdir/mkdtemp fails, fatal if errno != ENOSPC; ok gilles@Jacek Masiulaniec
2008-12-31rename may fail due to ENOSPC, make smtpd survive this condition; ok gilles@Jacek Masiulaniec
2008-12-31kill unnecessary function; ok gilles@Jacek Masiulaniec
2008-12-29Handle ENOSPC in queue_update_envelope; cleanup the code a bit; ok gilles@Jacek Masiulaniec
2008-12-27kill unused function; ok gilles@Jacek Masiulaniec
2008-12-27Manpage bits for "showqueue" -> "show queue" change.Jacek Masiulaniec
2008-12-27log_warn -> log_warnxJacek Masiulaniec
2008-12-27cleanup; ok gilles@Jacek Masiulaniec
2008-12-27Put common handler code in a function; ok chl@ gilles@Jacek Masiulaniec
2008-12-27Merge hash() and queue_message_hash() into one func, queue_hash(). Fix callersJacek Masiulaniec
to use this interface consistently; ok chl@ gilles@
2008-12-27Break showqueue and showrunqueue into 2 words; ok gilles@Jacek Masiulaniec
2008-12-26parse.y doesn't allow listen backlog configuration, so "bzero default" is used.Jacek Masiulaniec
Hardcode it instead: 5 is a popular choice across the tree; ok gilles@
2008-12-22typoJacek Masiulaniec
2008-12-22Fix few cases where "smtpctl showqueue" could exit prematurelyJacek Masiulaniec
if msg is delivered between readdir and opendir, or readdir and fopen, etc. etc. Be more unforgiving about errors other than ENOENT, and err() if they happen, not just warn(). ok gilles@
2008-12-22cleanupJacek Masiulaniec
2008-12-22s->s_msg.session_hostname must hold resolved hostname as well; ok gilles@Jacek Masiulaniec
2008-12-22Reduce IMSG_LKA_HOST to only make NI_NAMEREQD getnameinfo call. WeJacek Masiulaniec
don't need it to return NI_NUMERICHOST conversion because there's no reason not to do it in smtp; ok gilles@
2008-12-22delinting: salen may be used with no prior init; ok gilles@Jacek Masiulaniec
2008-12-22Remove entry from mdaproctree after reaping mda child; ok gilles@Jacek Masiulaniec
From: Nicholas Marriott <nicholas.marriott@gmail.com>
2008-12-22To reset state, it's enough to set s->s_state = S_HELO, rcptcountJacek Masiulaniec
is zeroed in MAIL FROM handler; ok gilles@
2008-12-21fix session flags resetting; ok gilles@Jacek Masiulaniec
2008-12-21- missing prototype + smtp.c was misusing session_auth_pickup()Gilles Chehade
- unlike starttls, ssmtp sets the F_SECURE flag on session before helo/ehlo handlers are called. this means that if we clear all flags in helo/ helo handlers, we prevent smtpd from advertising AUTH as it will do so only for F_SECURE sessions. This commits unbreaks SMTP AUTH with smtp sessions. Problem spotted by James Turner <james@bsdgroup.org>
2008-12-21Add more compile time checking; fix warnings reported by gcc.Jacek Masiulaniec
From: Nicholas Marriott <nicholas.marriott@gmail.com>
2008-12-21Add more compile time checking; fix one warning reported by gcc.Jacek Masiulaniec
From: Nicholas Marriott <nicholas.marriott@gmail.com>
2008-12-21- AUTH PLAIN may receive credentials as a parameter to AUTH or on aGilles Chehade
following line, this commit brings support for the latter which was not supported yet. - AUTH LOGIN is now supported, allowing smtp auth support on clients that do not support AUTH PLAIN (ie: my mobile phone for instance ;)
2008-12-20- update smtpd.conf to provide an example of an auth enabled listenerGilles Chehade
- update smtpd.conf.5 just to provide an example, a better description of "enable auth" will come when im done implementing it ;)
2008-12-20- import first bricks of SMTP AUTH support. currently only AUTH PLAIN isGilles Chehade
supported, AUTH LOGIN will follow soon. AUTH will only work if a listen directive has "enable auth" keywords, AND session is safe (ssmtp or starttls).
2008-12-19fix indentation, no binary change.Jacek Masiulaniec
2008-12-19- fatal() if flock() has failed for any reason that's not EWOULDBLOCK, thisGilles Chehade
is not supposed to happen but better safe than sorry. suggested by jacekm@ - while at it, remove the locking of delivery file we create when doing a Maildir delivery. the purpose of Maildir is to prevent the need for locking in the first place ... I must have been tired that day.
2008-12-19- smtpd handled mbox locking failures as "regular" temporary failures whichGilles Chehade
is not good at all. As a result, under heavy load messages would be kept in queue, and delayed for hours just because we failed locking a few times. This commit makes smtpd distinguish between lock fails and "regular" temporary fails. - delivery scheduler will reschedule immediately a message that couldn't be delivered because of a lock fail. If we fail to lock too many times we fallback to previous "delay increase" logic. "looks sane" jacekm@
2008-12-18Introduce safe_fclose, which tries to push file to the disk asJacek Masiulaniec
quickly as possible; it fails under temporary error conditions, letting caller react appropriately. ok gilles@
2008-12-18Declarations for functions used only in smtp_session.c were movedJacek Masiulaniec
to that file from smtpd.h. ok gilles@
2008-12-18Check fwrite return code at DATA stage.Jacek Masiulaniec
Add basic line length checking, as required by rfc. It is no longer required to disable EV_READ upon evbuffer_readline failure. ok gilles@
2008-12-18- condition lists is wrongly described, unbreak the following syntax:Gilles Chehade
"accept for { domain "foo", domain "bar" } ..." From Nicholas Mariott <nicholas.marriott@gmail.com>
2008-12-18Don't err() on blank lines.Jacek Masiulaniec
ok gilles@
2008-12-18Cleanup /incoming before handling each MAIL FROM.Jacek Masiulaniec
Improve cleanup condition to cover more cases. ok gilles@
2008-12-17Warn if empty map is being created; this catches at least usageJacek Masiulaniec
error such as "makemap foo.db". ok gilles@