* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/libexec/dma/conf.c,v 1.1 2008/02/02 18:20:51 matthias Exp $
+ * $DragonFly: src/libexec/dma/conf.c,v 1.2 2008/02/04 10:11:41 matthias Exp $
*/
#include <err.h>
config->features |= SECURETRANS;
else if (strcmp(word, "DEFER") == 0)
config->features |= DEFER;
+ else if (strcmp(word, "INSECURE") == 0)
+ config->features |= INSECURE;
}
}
.\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $DragonFly: src/libexec/dma/dma.8,v 1.5 2008/02/04 08:58:54 matthias Exp $
+.\" $DragonFly: src/libexec/dma/dma.8,v 1.6 2008/02/04 10:11:41 matthias Exp $
.\"
.Dd February 4, 2008
.Dt DMA 8
(string, default=empty)
.Xc
Path to your SSL certificate file.
+.It Ic SECURE Xo
+(boolean, default=commented)
+.Xc
+Change this entry to
+.Sq INSECURE
+to use plain text SMTP login over an insecure connection.
+You have to rename this variable manually to prevent that you send your
+password accidently over an insecure connection.
.It Ic DEFER Xo
(boolean, default=commented)
.Xc
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/libexec/dma/dma.h,v 1.2 2008/02/03 11:06:17 matthias Exp $
+ * $DragonFly: src/libexec/dma/dma.h,v 1.3 2008/02/04 10:11:41 matthias Exp $
*/
#ifndef DMA_H
#define SECURETRANS 0x4 /* SSL/TLS in general */
#define TLSINIT 0x8 /* Flag for TLS init phase */
#define DEFER 0x10 /* Defer mails */
+#define INSECURE 0x20 /* Allow plain login w/o encryption */
struct stritem {
SLIST_ENTRY(stritem) next;
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $DragonFly: src/libexec/dma/net.c,v 1.3 2008/02/04 08:58:54 matthias Exp $
+ * $DragonFly: src/libexec/dma/net.c,v 1.4 2008/02/04 10:11:41 matthias Exp $
*/
#include <sys/param.h>
}
if (do_auth == 1) {
- syslog(LOG_INFO, "%s: Use SMTP authentication", it->queueid);
- error = smtp_login(it, fd, a->login, a->password);
- if (error < 0) {
- syslog(LOG_ERR, "%s: remote delivery failed:"
- " SMTP login failed: %m", it->queueid);
- return (-1);
- }
- /* SMTP login is not available, so try without */
- else if (error > 0)
- syslog(LOG_ERR, "%s: SMTP login not available. Try without",
+ /*
+ * Check if the user wants plain text login without using
+ * encryption.
+ */
+ if (((config->features & SECURETRANS) == 0) &&
+ ((config->features & INSECURE) != 0)) {
+ syslog(LOG_INFO, "%s: Use SMTP authentication",
it->queueid);
+ error = smtp_login(it, fd, a->login, a->password);
+ if (error < 0) {
+ syslog(LOG_ERR, "%s: remote delivery failed:"
+ " SMTP login failed: %m", it->queueid);
+ return (-1);
+ }
+ /* SMTP login is not available, so try without */
+ else if (error > 0)
+ syslog(LOG_ERR, "%s: SMTP login not available."
+ " Try without", it->queueid);
+ } else {
+ syslog(LOG_ERR, "%s: Skip SMTP login. ",
+ it->queueid);
+ }
}
send_remote_command(fd, "MAIL FROM:<%s>", it->sender);