2009-07-30 5 views
0

Je travaille sur un projet Rails qui utilise Action Mailer pour envoyer des campagnes de messagerie. Pour le moment, j'ai testé tout avec un vieux compte GMail. Je me rapproche de la sortie maintenant et j'ai décidé de passer le serveur smtp à notre serveur de messagerie local.Débogage d'une erreur de délai d'attente SMTP

Tout cela est bien et dandy jusqu'à ce que nous essayons d'envoyer du courrier. Avec ces nouveaux paramètres du serveur smtp le logiciel de messagerie ne fait rien, mais le temps:

MY_SMTP_SETTINGS = { 
    :address => 'oz.some.server.edu', 
    :port => 465, 
    :user_name => MY_USERNAME, 
    :authentication => :login, 
    :password => MY_PASSWORD 
} 

C'est la trace de la pile de l'erreur que je reçois un peu de temps après avoir essayé d'envoyer une campagne:

Timeout::Error: execution expired 
    from /opt/local/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill' 
    from /opt/local/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' 
    from /opt/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' 
    from /opt/local/lib/ruby/1.8/net/protocol.rb:126:in `readline' 
    from /opt/local/lib/ruby/1.8/net/smtp.rb:911:in `recv_response' 
    from /opt/local/lib/ruby/gems/1.8/gems/ambethia-smtp-tls-1.1.2/lib/smtp-tls.rb:19:in `do_start' 
    from /opt/local/lib/ruby/1.8/net/smtp.rb:921:in `critical' 
    from /opt/local/lib/ruby/gems/1.8/gems/ambethia-smtp-tls-1.1.2/lib/smtp-tls.rb:19:in `do_start' 
    from /opt/local/lib/ruby/1.8/net/smtp.rb:525:in `start' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:681:in `perform_delivery_smtp' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:523:in `__send__' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:523:in `deliver!' 
    from /opt/local/lib/ruby/gems/1.8/gems/actionmailer-2.3.2/lib/action_mailer/base.rb:395:in `method_missing' 
    from /Users/ryan/Development/gsoc/cohort/repo/app/models/freemailer_campaign.rb:39:in `send_campaign' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_collection.rb:364:in `method_missing_without_paginate' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `method_missing' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `each' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `send' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_proxy.rb:219:in `method_missing' 
    from /opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_record/associations/association_collection.rb:364:in `method_missing_without_paginate' 
    from /Users/ryan/Development/gsoc/cohort/repo/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:167:in `method_missing' 
    from /Users/ryan/Development/gsoc/cohort/repo/app/models/freemailer_campaign.rb:37:in `send_campaign' 

Avez-ce que quelqu'un a une idée de comment je peux identifier mon problème?

Répondre

0

Utilisez telnet sur votre serveur de messagerie sur 465 port, si elle ouvre pas, vérifiez pare-feu et le serveur de messagerie configuration.Also vous pouvez essayer pour vos paramètres actionmailer:

:authentication => :plain (if so), 
:enable_starttls_auto => true