From b11660968221c71c85da92c25c2de893a8d6ff3b Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 7 Mar 2016 18:33:42 +0100 Subject: spellcheck --- interimap.1 | 8 ++++---- pullimap.1 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/interimap.1 b/interimap.1 index 7058f62..e23b953 100644 --- a/interimap.1 +++ b/interimap.1 @@ -143,7 +143,7 @@ default all three targets are considered. .TP .B \fB\-\-watch\fR[\fB=\fR\fIseconds\fR] Don't exit after a successful synchronization, and keep synchronizing -forevever instead. Sleep for the given number of \fIseconds\fR (or +forever instead. Sleep for the given number of \fIseconds\fR (or \(lq60\(rq if omitted) between two synchronizations. .TP @@ -170,7 +170,7 @@ Unless told otherwise by the \fB\-\-config=\fR\fIFILE\fR option, \fBInterIMAP\fR reads its configuration from \fI$XDG_CONFIG_HOME/interimap\fR (or \fI~/.config/interimap\fR if the XDG_CONFIG_HOME environment variable is unset) as an INI file. -The syntax of the configuration file is a serie of +The syntax of the configuration file is a series of \fIOPTION\fR=\fIVALUE\fR lines organized under some \fI[SECTION]\fR; lines starting with a \(oq#\(cq or \(oq;\(cq character are ignored as comments. @@ -293,7 +293,7 @@ mechanism. .TP .I compress Whether to use the IMAP COMPRESS extension [RFC4978] for servers -advertizing it. +advertising it. (Default: \(lqNO\(rq for the \(lq[local]\(rq section, \(lqYES\(rq for the \(lq[remote]\(rq section.) @@ -388,7 +388,7 @@ currently supported. .IP \[bu] \fBInterIMAP\fR will probably not work with non RFC-compliant servers. In particular, no work-around are currently implemented beside the -tunables in the \fBCONFIGURATION FILE\fR. Morever, few IMAP servers +tunables in the \fBCONFIGURATION FILE\fR. Moreover, few IMAP servers have been tested so far. .SH AUTHOR diff --git a/pullimap.1 b/pullimap.1 index e0f1ec3..05fdc2c 100644 --- a/pullimap.1 +++ b/pullimap.1 @@ -10,7 +10,7 @@ PullIMAP \- Pull mails from an IMAP mailbox and deliver them to a SMTP session .SH DESCRIPTION .PP -.B PullIMAP\fR retrives messages from an IMAP mailbox and deliver them +.B PullIMAP\fR retrieves messages from an IMAP mailbox and deliver them to a SMTP or LMTP transmission channel. It can also remove delivered messages after a configurable retention period. @@ -68,7 +68,7 @@ Unless told otherwise by the \fB\-\-config=\fR\fIFILE\fR option, \fBPullIMAP\fR reads its configuration from \fI$XDG_CONFIG_HOME/pullimap\fR (or \fI~/.config/pullimap\fR if the XDG_CONFIG_HOME environment variable is unset) as an INI file. -The syntax of the configuration file is a serie of +The syntax of the configuration file is a series of \fIOPTION\fR=\fIVALUE\fR lines organized under some \fI[SECTION]\fR; lines starting with a \(oq#\(cq or \(oq;\(cq character are ignored as comments. @@ -104,7 +104,7 @@ Hostname to use in EHLO or LHO commands. .TP .I deliver\-rcpt -Message recpient. +Message recipient. (Default: the username associated with the effective uid of the \fBpullimap\fR process.) @@ -176,7 +176,7 @@ mechanism. .TP .I compress Whether to use the IMAP COMPRESS extension [RFC4978] for servers -advertizing it. +advertising it. (Default: \(lqYES\(rq.) .TP -- cgit v1.2.3 From 8097c83d95aca78d946516435627d62001f7a10b Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 7 Mar 2016 23:33:45 +0100 Subject: pullimap: typo --- pullimap | 2 +- pullimap.1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pullimap b/pullimap index 27226d2..235bc62 100755 --- a/pullimap +++ b/pullimap @@ -124,7 +124,7 @@ sub sendmail($$) { # the connection due to a timeout (RFC 5321 section 4.5.3.2) my ($fam, $addr) = (PF_INET, $CONF->{'deliver-method'} // 'smtp:[127.0.0.1]:25'); $addr =~ s/^([ls]mtp):// or die; - my $ehlo = $1 eq 'lmtp' ? 'LHO' : $1 eq 'smtp' ? 'EHLO' : die; + my $ehlo = $1 eq 'lmtp' ? 'LHLO' : $1 eq 'smtp' ? 'EHLO' : die; $ehlo .= ' '. ($CONF->{'deliver-ehlo'} // 'localhost.localdomain'); my $port = $addr =~ s/:(\d+)$// ? $1 : die; diff --git a/pullimap.1 b/pullimap.1 index 05fdc2c..52a6152 100644 --- a/pullimap.1 +++ b/pullimap.1 @@ -98,7 +98,7 @@ messages. Both SMTP [RFC 5321] and LMTP [RFC 2030] are supported. .TP .I deliver\-ehlo -Hostname to use in EHLO or LHO commands. +Hostname to use in EHLO or LHLO commands. (Default: \(lq\fIlocalhost.localdomain\fR\)\(rq.) -- cgit v1.2.3 From a9a0501bc0ce2c5937e6e47cc0db8f2f0ac4ec18 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 7 Mar 2016 23:34:08 +0100 Subject: pullimap: add section name in debug messages. --- pullimap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pullimap b/pullimap index 235bc62..db3090f 100755 --- a/pullimap +++ b/pullimap @@ -219,7 +219,7 @@ sub smtp_send(@) { # the remote mailbox # $CONF->{'logger-fd'} = \*STDERR if $CONFIG{debug}; -my $IMAP = Net::IMAP::InterIMAP::->new( %$CONF, %CONFIG{qw/quiet debug/} ); +my $IMAP = Net::IMAP::InterIMAP::->new( %$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0] ); # Remove messages with UID < UIDNEXT and INTERNALDATE at most # $CONF->{'purge-after'} days ago. @@ -266,7 +266,7 @@ sub pull(;$) { my $uid = $mail->{UID}; my $from = first { defined $_ and @$_ } @{$mail->{ENVELOPE}}[2,3,4]; $from = (defined $from and @$from) ? $from->[0]->[2].'@'.$from->[0]->[3] : ''; - print STDERR "($MAILBOX): UID $uid from <$from> ($mail->{INTERNALDATE})\n" unless $CONFIG{quiet}; + $IMAP->log("UID $uid from <$from> ($mail->{INTERNALDATE})") unless $CONFIG{quiet}; sendmail($from, $mail->{RFC822}) unless $CONFIG{'no-delivery'}; -- cgit v1.2.3 From d0d439750b572250ae00b595d9a742ccbb7b8a4e Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 8 Mar 2016 00:01:02 +0100 Subject: pullimap: set keepalive options on socket. --- pullimap | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pullimap b/pullimap index db3090f..0e31a90 100755 --- a/pullimap +++ b/pullimap @@ -219,7 +219,11 @@ sub smtp_send(@) { # the remote mailbox # $CONF->{'logger-fd'} = \*STDERR if $CONFIG{debug}; -my $IMAP = Net::IMAP::InterIMAP::->new( %$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0] ); +my $IMAP = do { + my %config = (%$CONF, %CONFIG{qw/quiet debug/}, name => $ARGV[0]); + $config{keepalive} = 1 if defined $CONFIG{idle} and $config{type} ne 'tunnel'; + Net::IMAP::InterIMAP::->new( %config ); +}; # Remove messages with UID < UIDNEXT and INTERNALDATE at most # $CONF->{'purge-after'} days ago. -- cgit v1.2.3