Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-05 Thread Miguel Lopes
Ok. Solved!
It was really just a configuration issue:
mail.settings.server = 'localhost:25'# I
wasn't referring to the server properly!
mail.settings.sender = 'whatever.m...@yourdomain.com'  # your email

with this setup I can send email with sendmail from web2py.
Txs for pointing me to the right direction.
Miguel

On Sun, Dec 5, 2010 at 5:17 PM, Miguel Lopes  wrote:

> Ok. here's the situation:
>
> I only have sendmail installed and running, no exim, postfix or other. I've
> checked this listing running services by using:
> netstat -tap
>
>  I successfully sent email using telnet like Bernardo suggested.
> Since I have sendmail working, couldn't I use it with web2py, instead of
> using some other solution?
>
>
> Txs José for the tip regarding sSMTP, I've also spotted what seems like a
> easy way to install and configure a mail server http://www.iredmail.org/.
> In case I can get this going I just might use sSMTP.
>
> txs,
> Miguel
> *
> *
> *
> *
> *
> *
> On Sun, Dec 5, 2010 at 9:44 AM, José L.  wrote:
>
>>
>>
>> On 4 dic, 21:54, Miguel Lopes  wrote:
>> > Hi Bernado,
>> >
>> > 2010/12/4 Bernardo Botella Corbí 
>> >
>> > > Hi Miguel,
>> >
>> > > which test did you do from command line?
>> > > does web2py print something? Any error?
>> >
>> > > Try to do the next thing from the command line:
>> > > tail -f /var/log/mail.log
>> >
>> > If I try to send mail from web2py using local resources it fails
>> silently.
>> > I can use a gmail account to send the email it works, so perhaps I'm
>> > configuring gluon.tools.Mail wrongly:
>> > mail.settings.server = 'myIP:25'# your SMTP
>> > server
>> > mail.settings.sender = 'u...@mydomain.pt' # your email
>> > mail.settings.login = 'user:pass'   # your
>> > credentials or None 'username:password'
>> >
>> > I'm unsure about mails.settings.server. Is this correct?
>> >
>> > > (if you are in ubuntu/debian, don't know where it would be in other
>> > > distributions...)
>> >
>> > > I'm using Debian Lenny.
>> >
>> > txs,
>> > Miguel
>>
>>
>> Using Debian Lenny you have probably intalled exim4 as mail server,
>> don't need to install postfix to do the same.
>> Do "dpkg-reconfigure exim4-config" (previously install exim4-config if
>> you don't have it installed) and choose the option of your mail server
>> settings you prefer.
>>
>> Anyway, if you're not going to use it massively, I'd recomend you
>> replacing exim4 by ssmtp (the simplest mail server around), as it's
>> really easy to setup.
>> http://wiki.debian.org/sSMTP
>>
>> To test if it's working, then install  mail-utils, and use the command
>> "mail" to send mails and check if they 're received. Then you are sure
>> your server setup is working and you can think of configuring mail in
>> web2py.
>>
>> Regards
>> José L.
>>
>
>


Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-05 Thread Miguel Lopes
Ok. here's the situation:

I only have sendmail installed and running, no exim, postfix or other. I've
checked this listing running services by using:
netstat -tap

I successfully sent email using telnet like Bernardo suggested.
Since I have sendmail working, couldn't I use it with web2py, instead of
using some other solution?


Txs José for the tip regarding sSMTP, I've also spotted what seems like a
easy way to install and configure a mail server http://www.iredmail.org/. In
case I can get this going I just might use sSMTP.

txs,
Miguel
*
*
*
*
*
*
On Sun, Dec 5, 2010 at 9:44 AM, José L.  wrote:

>
>
> On 4 dic, 21:54, Miguel Lopes  wrote:
> > Hi Bernado,
> >
> > 2010/12/4 Bernardo Botella Corbí 
> >
> > > Hi Miguel,
> >
> > > which test did you do from command line?
> > > does web2py print something? Any error?
> >
> > > Try to do the next thing from the command line:
> > > tail -f /var/log/mail.log
> >
> > If I try to send mail from web2py using local resources it fails
> silently.
> > I can use a gmail account to send the email it works, so perhaps I'm
> > configuring gluon.tools.Mail wrongly:
> > mail.settings.server = 'myIP:25'# your SMTP
> > server
> > mail.settings.sender = 'u...@mydomain.pt' # your email
> > mail.settings.login = 'user:pass'   # your
> > credentials or None 'username:password'
> >
> > I'm unsure about mails.settings.server. Is this correct?
> >
> > > (if you are in ubuntu/debian, don't know where it would be in other
> > > distributions...)
> >
> > > I'm using Debian Lenny.
> >
> > txs,
> > Miguel
>
>
> Using Debian Lenny you have probably intalled exim4 as mail server,
> don't need to install postfix to do the same.
> Do "dpkg-reconfigure exim4-config" (previously install exim4-config if
> you don't have it installed) and choose the option of your mail server
> settings you prefer.
>
> Anyway, if you're not going to use it massively, I'd recomend you
> replacing exim4 by ssmtp (the simplest mail server around), as it's
> really easy to setup.
> http://wiki.debian.org/sSMTP
>
> To test if it's working, then install  mail-utils, and use the command
> "mail" to send mails and check if they 're received. Then you are sure
> your server setup is working and you can think of configuring mail in
> web2py.
>
> Regards
> José L.
>


Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-05 Thread Bernardo Botella Corbí
Hi,

did you try to send a mail from telnet?

telnet localhost 25 (this connects to your smtp server)
EHLO mail.example.com

MAIL FROM: 

RCPT TO: 

data
# enter message bodyand end with a line with only a full stop.
blah blah blah
more blah
.

with this lines you should be able to send a mail from telnet. Does that
work?

Bernardo


2010/12/4 Miguel Lopes 

> Hi Bernado,
>
> 2010/12/4 Bernardo Botella Corbí 
>
> Hi Miguel,
>>
>> which test did you do from command line?
>> does web2py print something? Any error?
>>
>> Try to do the next thing from the command line:
>> tail -f /var/log/mail.log
>>
>
> If I try to send mail from web2py using local resources it fails silently.
> I can use a gmail account to send the email it works, so perhaps I'm
> configuring gluon.tools.Mail wrongly:
> mail.settings.server = 'myIP:25'# your SMTP
> server
> mail.settings.sender = 'u...@mydomain.pt' # your email
> mail.settings.login = 'user:pass'   # your
> credentials or None 'username:password'
>
> I'm unsure about mails.settings.server. Is this correct?
>
>
>> (if you are in ubuntu/debian, don't know where it would be in other
>> distributions...)
>>
>> I'm using Debian Lenny.
>
> txs,
> Miguel
>
>


Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-04 Thread Miguel Lopes
Hi Bernado,

2010/12/4 Bernardo Botella Corbí 

> Hi Miguel,
>
> which test did you do from command line?
> does web2py print something? Any error?
>
> Try to do the next thing from the command line:
> tail -f /var/log/mail.log
>

If I try to send mail from web2py using local resources it fails silently.
I can use a gmail account to send the email it works, so perhaps I'm
configuring gluon.tools.Mail wrongly:
mail.settings.server = 'myIP:25'# your SMTP
server
mail.settings.sender = 'u...@mydomain.pt' # your email
mail.settings.login = 'user:pass'   # your
credentials or None 'username:password'

I'm unsure about mails.settings.server. Is this correct?


> (if you are in ubuntu/debian, don't know where it would be in other
> distributions...)
>
> I'm using Debian Lenny.

txs,
Miguel


Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-04 Thread Bernardo Botella Corbí
Hi Miguel,

which test did you do from command line?
does web2py print something? Any error?

Try to do the next thing from the command line:
tail -f /var/log/mail.log

(if you are in ubuntu/debian, don't know where it would be in other
distributions...)

and see if it complaints about anything when trying to send a mail from
web2py.

Bernardo

2010/12/4 Miguel Lopes 

>
>
> On Sat, Dec 4, 2010 at 1:12 AM, mdipierro  wrote:
>
>> did you apt-get install portfix?
>>
>> Do you mean postfix? No I didn't.
>
> By the way, tp be precise in the config I'm using:
> mail.settings.server = 'myIPaddress:25'  # your
> SMTPserver
>
> since sendmail uses port 25 by default.
> Miguel
>
>
>
>>
>> On Dec 3, 6:36 pm, Miguel Lopes  wrote:
>> > I'm having problems trying to make gluon.tools.Mail work on a vps, and
>> > wonder if anyone knows what would be a minimal setup for sending mail.
>> > I just need to send the an occasional mail. The server as sendmail
>> working,
>> > which I've confirmed in the command line. However, I'm unable to make it
>> > work via web2py.
>> > My model file reads:
>> >
>> > mail.settings.server = 'localhost'  # your
>> SMTP
>> > server
>> > mail.settings.sender = 'r...@mydomain.pt' # your email
>> > #mail.settings.login = ''#
>> your
>> > credentials or None 'username:password'
>> >
>> > I confess being a complete n00b regarding linux admin.
>> > Is sendmail enough? What could I be missing?
>> > Miguel
>>
>
>


Re: [web2py] Re: minimal setup on Debian for using Mail()

2010-12-03 Thread Miguel Lopes
On Sat, Dec 4, 2010 at 1:12 AM, mdipierro  wrote:

> did you apt-get install portfix?
>
> Do you mean postfix? No I didn't.

By the way, tp be precise in the config I'm using:
mail.settings.server = 'myIPaddress:25'  # your
SMTPserver

since sendmail uses port 25 by default.
Miguel



>
> On Dec 3, 6:36 pm, Miguel Lopes  wrote:
> > I'm having problems trying to make gluon.tools.Mail work on a vps, and
> > wonder if anyone knows what would be a minimal setup for sending mail.
> > I just need to send the an occasional mail. The server as sendmail
> working,
> > which I've confirmed in the command line. However, I'm unable to make it
> > work via web2py.
> > My model file reads:
> >
> > mail.settings.server = 'localhost'  # your
> SMTP
> > server
> > mail.settings.sender = 'r...@mydomain.pt' # your email
> > #mail.settings.login = ''#
> your
> > credentials or None 'username:password'
> >
> > I confess being a complete n00b regarding linux admin.
> > Is sendmail enough? What could I be missing?
> > Miguel
>