Command Line e-mail client w/Authentication Needed!!
I have qwest DSL and when sending e-mail I must authenticate with the qwest SMTP e-mail server (pop.phnx.qwest.net). Anyways, the machine that will be sending this e-mail needs to do it over command line. Is there a way to include authentication credentials (user/pass) to login to the SMTP server using a command line mail client?
This is the error I recieve as root when sending an e-mail with this command: mail -s Testing myemailaddress@gmail.com Final-Recipient: RFC822; myemailaddress@gmail.com Action: failed Status: 5.1.3 Remote-MTA: DNS; pop.phnx.qwest.net Diagnostic-Code: SMTP; 553 relaying denied. I'm pretty sure that my issue is authentication. The qwest guy said you had to authenticate as well over SMTP. thanks rootking |
|
Quote:
Code:
|
Quote:
But the standard mail prog probably doesn't to think about it. Try nail, it has command line authentication options. Nail is an enhanced version of the mail client. Here's the nail man page |
Quote:
Code:
Code:
So what I really need to do is authenticate to the pop server using the BSD machine before sending the e-mail using nail. This is where I am at now. If you can help me at all with this that would be great. I will be seeing what I can thanks rootking |
Quote:
Code:
env MAILRC=/dev/null from=scriptreply@domain smtp=host \ But it did work with another email account I have so give it a whirl. Other than that, I don't know. Let me know if you get it working on the BSD end. |
Quote:
Where did you place this code?: Code:
env MAILRC=/dev/null from=scriptreply@domain smtp=host \ Code:
MAILRC=/dev/null nail -n |
Figured things out :)
Well I finally figured this out. I first want to say how much I appreciate your help. You have helped guide me in the right direction.
The solution ended up being quite easy (as things usually are when I can't find an answer @ first). Remember how I had said that qwest requires POP authentication before you can send or receive e-mail, And how it "caches" the user/pass credentials for a short period of time. I ended up downloading a small pop3 client for BSD/Linux called pop3check (http://pop3check.sourceforge.net/) and running this command within the script to authenticate to the qwest pop server before sending the server status e-mail: Code:
popcheck -s pop.phnx.qwest.net -u <user@qwest.net> -p thanks for all your help again. |
Cool, no problem. I learned some new things myself.
As for this: Code:
env MAILRC=/dev/null from=scriptreply@domain smtp=host \ If I was going to use it on a regular basis, I'd put in a shell script, jazz it up bit. Glad I was of some use. |
All times are GMT -5. The time now is 11:12 PM. |