LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2007, 08:33 AM   #1
The_Spider
LQ Newbie
 
Registered: Apr 2004
Posts: 15

Rep: Reputation: 0
nail with smtp


Hi,

Simple question, im sure the answer is very obvious, so:

I have set up a simple .mailrc file, now i wish to send an email from the command line (its part of an automated task). So i simply use something akin to the following (email names have been changed to protect the innocent )

nail -A accountname -s "AUTOTASK" target@email.com < task_msg

however, i get:

smtp-server: 535 #5.7.0 Authentication failed back.

I can send emails using telnet, and the verbose output from nail is something like

Code:
Resolving host mail.isp.com . . . done.
Connecting to 1.2.3.4 . . . connected.
220-mail.isp.com ESMTP
220 ESMTP; hostname [IP ADDRESS] funny comment
>>> EHLO linuxbox
250-mail.isp.com
250-8BITMIME
250-SIZE 33554432
250-AUTH PLAIN LOGIN
250 AUTH=PLAIN LOGIN
>>> AUTH LOGIN
334 VXNlcm5hbWU6
>>> ZGhkYm94
334 UGFzc3dvcmQ6
>>> Y2xud2V5ZmE=
why did it not reply to the AUTH LOGIN with my username?

how can i fix it?

mailrc file:

Code:
account accountname {
set from=accountname@isp.com
set smtp=smtp://mail.isp.com
set smtp-auth-user=accountname
set smtp-auth-password=not_my_real_pass
}
Thanks.
 
Old 08-01-2007, 09:21 AM   #2
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
I use mutt and cyrus-imap. In my ~/.mutt/muttrc file I have:

set folder="{localhost}"
set spoolfile="{localhost}INBOX"
set imap_user="user@example.com"
set move=no
set sort=reverse-date-sent

Also I configured postfix to relay any messages coming from the localhost where it is running; that way I can send email messages with one-line commands, even remotely while using putty/ssh or via cron jobs. Any other relays coming from other computers need to authenticate. However, you can also create firewall rules and postfix rules to allow external networks to relay.
 
Old 08-01-2007, 07:17 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
why did it not reply to the AUTH LOGIN with my username?
It replied with username "dhdbox" and password "clnweyfa". Perhaps you didn't use the correct ones?
Code:
$ echo ZGhkYm94 | openssl enc -base64 -d
dhdbox$
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Syntax using nail (mailx) for smtp without postfix or sendmail Casey Linux - Server 2 06-12-2007 01:41 AM
nail not sending mail thedlw Linux - General 1 08-31-2006 05:32 PM
LXer: Mail with Nail LXer Syndicated Linux News 0 02-17-2006 07:46 AM
mutt vs. nail Berhanie Linux - Software 3 09-02-2004 07:48 PM
Setting up nail NonSumPisces Linux - Newbie 0 07-03-2004 05:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration