Henry Precheur | 2 Aug 2008 06:34

Using Maildir

I am trying to make mailx work with maildirs:

I compiled mailx and everything seems to be OK.

I have a .mailrc which contains:
folder ~/mail/INBOX/

When I type:
$ ./mailx
"/home/henry/mail/INBOX/": 11 messages
No mail for henry
$ echo $?
1

But when I do:
$ ./mailx -f ~/mail/INBOX
"/home/henry/mail/INBOX/": 11 messages
Heirloom mailx version 12.4 7/29/08.  Type ? for help.
"/home/henry/mail/INBOX": 11 messages
[... list of messages ...]

I want mailx to read ~/mail/INBOX without specifying the -f option. How
do I acheive this?

The manual does seem to contain any information about this.

Thank-you,

--

-- 
  Henry Prêcheur
(Continue reading)

Gunnar Ritter | 2 Aug 2008 10:28
Picon
Favicon

Re: Using Maildir

Henry Precheur <henry@...> wrote:

> I have a .mailrc which contains:
> folder ~/mail/INBOX/
>
> When I type:
> $ ./mailx
> "/home/henry/mail/INBOX/": 11 messages
> No mail for henry
> $ echo $?
> 1

This is actually not specific to maildir folders. When
you have a "folder" command in your .mailrc, mailx
will execute it, but afterwards switch to the regular
inbox instead. In your case, there is no mail available
there, so you get this message.

You have to tell mailx that you'd like to change your
mailbox location instead. That's done by setting the
MAIL variable. For whatever reason, no file expansions
are done when interpreting it, so you'd need something
like

set MAIL=/home/me/mail/INBOX

in your .mailrc. Also it looks like you'd want to have

set folder=mail

(Continue reading)

Randy Kramer | 8 Aug 2008 16:03
Picon

Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Introductory notes:
   * I've been trying a lot of things to get nail to send email via smtp and 
gmail.com (as the ISP) (googling, experiments, reading the archives ...)
   * I already use kmail on this machine to send mail via smtp and gmail.com, 
so at least kmail has the right setup , I want to use nail to send some 
special emails from the command line
   * I'm using nail version 11.25 (as shipped with Mandriva 2006)

I saw the post in the achives about the non-existence of a user list--this is 
probably a user type question--I don't think this question needs the 
attention of the nail developer, I think it needs someone who already uses 
nail / smtp / gmail.

Here's the verbose output of nail when I try to send an email (I tried a lot 
of variations in the ~/.mailrc and the names and locations of the certificate 
files--most recently I learned that gmail started using the Equifax 
certificate as of July 31 (iiuc)--that change was transparent to me from 
kmail--I never had to do anything to deal with it):
'
$ nail -v -n -s "subject" rhkramer@... < test.msg
Resolving host smtp.gmail.com . . . done.
Connecting to 64.233.185.109 . . . connected.
220 mx.google.com ESMTP 9sm2018811wrl.31
>>> EHLO s14.home
250-mx.google.com at your service, [65.78.111.151]
250-SIZE 28311552
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
>>> STARTTLS
(Continue reading)

Sergey Matveev | 8 Aug 2008 16:13
Picon
Gravatar

Re: Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Greetings,

On Fri, Aug 08, 2008 at 10:03:29AM -0400, Randy Kramer wrote:

> Introductory notes:
>    * I've been trying a lot of things to get nail to send email via smtp and 
> gmail.com (as the ISP) (googling, experiments, reading the archives ...)
>    * I already use kmail on this machine to send mail via smtp and gmail.com, 
> so at least kmail has the right setup , I want to use nail to send some 
> special emails from the command line
>    * I'm using nail version 11.25 (as shipped with Mandriva 2006)
> 
> I saw the post in the achives about the non-existence of a user list--this is 
> probably a user type question--I don't think this question needs the 
> attention of the nail developer, I think it needs someone who already uses 
> nail / smtp / gmail.
> 
> Here's the verbose output of nail when I try to send an email (I tried a lot 
> of variations in the ~/.mailrc and the names and locations of the certificate 
> files--most recently I learned that gmail started using the Equifax 
> certificate as of July 31 (iiuc)--that change was transparent to me from 
> kmail--I never had to do anything to deal with it):
> '
> $ nail -v -n -s "subject" rhkramer@... < test.msg
> Resolving host smtp.gmail.com . . . done.
> Connecting to 64.233.185.109 . . . connected.
> 220 mx.google.com ESMTP 9sm2018811wrl.31
> >>> EHLO s14.home
> 250-mx.google.com at your service, [65.78.111.151]
> 250-SIZE 28311552
(Continue reading)

Dr. Gary E. RAFE | 8 Aug 2008 17:07
Picon

Re: Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Randy Kramer <rhkramer@...> wrote:

!Introductory notes:
!   * I've been trying a lot of things to get nail to send email via smtp and 
!gmail.com (as the ISP) (googling, experiments, reading the archives ...)
!   * I already use kmail on this machine to send mail via smtp and gmail.com, 
!so at least kmail has the right setup , I want to use nail to send some 
!special emails from the command line
!   * I'm using nail version 11.25 (as shipped with Mandriva 2006)
!
!...

I use nail/mailx built from released source on a Mac OS X 10.4.x
system (and occasionally a FreeBSD 6.x system) routinely with the
configuration (in ~/.nailrc):

set ssl-method="ssl3"
set smtp="smtp.gmail.com:587"
set smtp-use-starttls
set smtp-auth="login"
set smtp-auth-user="UserName@..."
set smtp-auth-password="PasswordText"

The last time I looked at this (Aug 2007),
it appeared that nail/mailx got its Cert from the "cert.pem"
certificate bundle (which dates to 28 Feb 2005).

Capturing (and analyzing) a kernel trace of your running your nail/mailx
process could be a useful exercise here.
--
(Continue reading)

Randy Kramer | 8 Aug 2008 17:22
Picon

Re: Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Sergey,

Wonderful, thank you!

I think the key was adding the "set ssl-verify=ignore" in the ~/.mailrc file.  
If that means that a cert is not being used, I don't see that as a problem 
for the type of emails I'm sending.  (Perhaps that will change in the future, 
but I'll (try to) deal with that then. ;-)

I did have to leave the port number (587) in.

So, now my ~/.mailrc looks like this (essentially matching yours):

set smtp=smtp.gmail.com:587
set smtp-use-starttls
set smtp-auth-user=rhkramer@...
set smtp-auth-password=<deleted>
set from="rhkramer@..."
set ssl-verify=ignore

On Friday 08 August 2008 10:13 am, Sergey Matveev wrote:
---< good stuff snipped >---

Randy Kramer

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
(Continue reading)

Martin Neitzel | 8 Aug 2008 17:30
Picon
Favicon

Re: Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Hi Randy,

> Error with certificate at depth: 0
>  issuer = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
>  subject = /C=US/ST=California/L=Mountain View/O=Google Inc./CN=smtp.gmail.com

This means that gmail has a certificate signd by Equifax...

>  err 20: unable to get local issuer certificate

... but your configuration has neither GMail's public key nor Equifaxen's
public key on record, so it doesn't have any reason to trust the alleged
identity of "..../O=Google Inc./CN=smtp.gmail.com".

According to http://www.geotrust.com/resources/root_certificates/index.asp
this would is the current Equifax Secure Certificate Authority
certificate:

-----BEGIN CERTIFICATE-----
MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJV
UzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2Vy
dGlmaWNhdGUgQXV0aG9yaXR5MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1
MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoTB0VxdWlmYXgxLTArBgNVBAsTJEVx
dWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCBnzANBgkqhkiG9w0B
AQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPRfM6f
BeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+A
cJkVV5MW8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kC
AwEAAaOCAQkwggEFMHAGA1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQ
MA4GA1UEChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlm
aWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoGA1UdEAQTMBGBDzIwMTgw
(Continue reading)

Martin Neitzel | 8 Aug 2008 17:34
Picon
Favicon

Re: Is somebody using nail to send mail via smtp and gmail.com: err 20: unable to get local issuer certificate

Another, closer look at your email makes  me notice:

> Error loading /etc/certs/Equifax_Secure_Certificate_Authority_DER.cer
> Error with certificate at depth: 0
>  issuer = /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
>  subject = /C=US/ST=California/L=Mountain View/O=Google Inc./CN=smtp.gmail.com
>  err 20: unable to get local issuer certificate

> set ssl-ca-file=/etc/certs/Equifax_Secure_Certificate_Authority_DER.crt

You need PEM format, not DER format.  Otherwise, you are all set.

								Martin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane