Mercurial > masqmail
comparison src/deliver.c @ 205:4fd237550525
REMOVED MAILDIR SUPPORT
if you want to deliver to maildir, use an MDA like procmail
masqmail can pass mail to an MDA by setting `mda' in masqmail.conf
author | meillo@marmaro.de |
---|---|
date | Fri, 16 Jul 2010 16:38:50 +0200 |
parents | dc89737b27aa |
children | 8cddc65765bd |
comparison
equal
deleted
inserted
replaced
204:5745edd5b769 | 205:4fd237550525 |
---|---|
125 | 125 |
126 if (g_list_find_custom (conf.mbox_users, user, _g_list_strcasecmp) != NULL) | 126 if (g_list_find_custom (conf.mbox_users, user, _g_list_strcasecmp) != NULL) |
127 mbox_type = "mbox"; | 127 mbox_type = "mbox"; |
128 else if (g_list_find_custom (conf.mda_users, user, _g_list_strcasecmp) != NULL) | 128 else if (g_list_find_custom (conf.mda_users, user, _g_list_strcasecmp) != NULL) |
129 mbox_type = "mda"; | 129 mbox_type = "mda"; |
130 else if (g_list_find_custom (conf.maildir_users, user, _g_list_strcasecmp) != NULL) | |
131 mbox_type = "maildir"; | |
132 | 130 |
133 if (strcmp(mbox_type, "mbox") == 0) { | 131 if (strcmp(mbox_type, "mbox") == 0) { |
134 DEBUG(1) debugf("attempting to deliver %s with mbox\n", msg->uid); | 132 DEBUG(1) debugf("attempting to deliver %s with mbox\n", msg->uid); |
135 if (append_file(msg, hdr_list, rcpt->local_part)) { | 133 if (append_file(msg, hdr_list, rcpt->local_part)) { |
136 if (env_addr != rcpt) { | 134 if (env_addr != rcpt) { |
177 logwrite(LOG_ALERT, "could not expand string %s\n", conf.mda); | 175 logwrite(LOG_ALERT, "could not expand string %s\n", conf.mda); |
178 | 176 |
179 destroy_table(var_table); | 177 destroy_table(var_table); |
180 } else | 178 } else |
181 logwrite(LOG_ALERT, "mbox type is mda, but no mda command given in configuration\n"); | 179 logwrite(LOG_ALERT, "mbox type is mda, but no mda command given in configuration\n"); |
182 | |
183 #ifdef ENABLE_MAILDIR | |
184 } else if (strcmp(mbox_type, "maildir") == 0) { | |
185 DEBUG(1) debugf("attempting to deliver %s with maildir\n", msg->uid); | |
186 if (maildir_out(msg, hdr_list, rcpt->local_part, 0)) { | |
187 if (env_addr != rcpt) { | |
188 logwrite(LOG_NOTICE, "%s => %s@%s <%s@%s> with local\n", msg->uid, | |
189 rcpt->local_part, rcpt->domain, env_addr->local_part, env_addr->domain); | |
190 } else { | |
191 logwrite(LOG_NOTICE, "%s => <%s@%s> with maildir\n", msg->uid, | |
192 rcpt->local_part, rcpt->domain); | |
193 } | |
194 addr_mark_delivered(rcpt); | |
195 ok = TRUE; | |
196 } else | |
197 addr_mark_failed(rcpt); | |
198 #endif | |
199 } else | 180 } else |
200 logwrite(LOG_ALERT, "unknown mbox type '%s'\n", mbox_type); | 181 logwrite(LOG_ALERT, "unknown mbox type '%s'\n", mbox_type); |
201 } | 182 } |
202 | 183 |
203 destroy_header(retpath_hdr); | 184 destroy_header(retpath_hdr); |