Ok, I've been diggin for awhile here, and I keep getting the same error when I try to respond to a test ticket in the system.
Error: Can't connect to : Invalid argument!
ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Thu Aug 7 09:24:59 2008
Message: Can't connect to : Invalid argument!
Traceback (4453):
Module: Kernel::System::Email::SMTP::Send (v1.14) Line: 127
Module: Kernel::System::Email::Send (v1.31.2.3) Line: 498
Module: Kernel::System::Ticket::Article::ArticleSend (v1.147.2.2) Line: 1610
Module: Kernel::Modules::AgentTicketCompose::Run (v1.30.2.7) Line: 374
Module: Kernel::System::Web::InterfaceAgent::Run (v1.23) Line: 670
Module: ModPerl::ROOT::ModPerl::Registry::var_data_otrs_bin_cgi_2dbin_index_2epl::handler (v) Line: 47
Module: (eval) (v1.81) Line: 204
Module: ModPerl::RegistryCooker::run (v1.81) Line: 204
Module: ModPerl::RegistryCooker::default_handler (v1.81) Line: 170
Module: ModPerl::Registry::handler (v1.99) Line: 31
I've tried using the host name, the FQDN, and the IP and I get the same error.
I have the following in my Config.pm:
#Sendmail Config Options#
$Self->{'SendmailModule'} = 'Kernel::System::Email::SMTP';
$Self->{'SendmailModule::Host'} = '';
$Self->{'SendmailModule::Port'} = '25';
$Self->{'SendmailModule::AuthUser'} = '';
$Self->{'SendmailModule::AuthPassword'} = '';
And I edited fetchmailrc.dist and saved it as .fetchmailrc adding this line:
poll protocol IMAP port 993 plugin "openssl s_client -connect %h:%p" user pass is here
I'm not a hundred percent positive about the spot marked queue? as it seemed it was sending to a queue and not a user like was identified in the file, so I don't know if putting a queue name there works.
I did this test:
linux:/opt/otrs# cd bin
linux:/opt/otrs/bin# cat ../doc/test-email-1.box | ./PostMaster.pl
linux:/opt/otrs/bin#
And the email showed up in the Postmaster queue and the Raw queue without issue...
Any idea what I'm missing here?
Thanks
IMAP/ SMTP Setup
OK Mike,
Are you logged in as an Agent or as a Customer when you have this issue? If I configure either a POP3 or IMAP Post Master Mail Account in the Admin section and select "Run Now" on the account in the list it will successfully receive the emails (we have discovered that the cron is broken).
There is an issue with replying to tickets via email, it seems, though, I don't get the mess you posted. This is simply fixed by going to the OTRS Admin and in the System section clicking on Email Addresses and then changing the otrs@localhost email address to a real email address. Our next release will set this on setup.
Good luck, let me know if I have missed what you are talking about here.
Austin
I was receiving the error
I was receiving the error when logged in as an agent. Down below here I've noted what I did to clear this issue up, and it seems to be ok now.
My new fun is trying to figure out how to get fetchmailrc to let me query an imap mail box. That's not been going too well. when i edit the fetchmailrc.dist and try and save it as .fetchmailrc in the same directory it keeps telling me i don't have permission, even though I'm logged into SFTP as root.
If I can just work out this issue of having it regularly check out helpdesk email box to generate tickets, I think it'll be about ready to start testing with a couple users.
IMAP/ SMTP Setup
So, somehow the included IMAP/POP3 integration is insufficient for your needs? As I noted, there is a cronjob issue that prevents this from checking mail at regular intervals once that is straightened out (I should have it uploaded tomorrow, Sunday). I am just confused since it sounds like you are trying to achieve things that OTRS itself is already supposed to do, though not quite doing due to a small bug on our part.
As for permissions problems, you are logged in as root or as admin? The admin user may not have permission to modify that file. What I would suggest you do is edit the file you want and place it into the admin users home directory then SSH in as the admin user and copy it into place using sudo ... so it would look like this:
Using a command with sudo will make it execute as the root user.
Another alternative is to simply set the root users password (it is disabled by default for security reasons) using sudo ... so:
(that switches you to the root user, then the passwd command sets the root users password).
Then you can really SFTP in as root. If this is what you are doing and it really isn't letting you overwrite/write the file let me know. But really, I am either confused about what you are trying to achieve or you are trying to do something it should be doing for you already if you configure it right.
Austin
Well, possibly IMAP support
Well, possibly IMAP support is builtin, but I couldn't get it to work without doing all this crazy stuff I've done.
As for the file, I'm SFTP'd in as root, but was unable to write the file because it said I didn't have permission, which doesn't make sense since I'm root.
YAY for 1.1.2
Well, whatever you guys did in 1.1.2, it fixed ALL my mail problems. I loaded up the 1.1.2 box, restored from my backup of the 1.1.1 box and it immediately starting picking up emails from our helpdesk box and generating tickets. WIN.
Thanks for the fix!
I feel like I'm moving
I feel like I'm moving backwards here. The documentation to do this is all over the place and not really clear for us windows admins.
Where I'm at now, I've got a separate VM running the 1.1.1 while i have 1.1.0 running so I can compare settings. I tried to import and nothing worked right, so I went back to scratch with the 1.1.1.
What I've done so far is setup a user using it's internal DB so i can log in and out.
I edited the Config.pm with the following:
#Enable Agent LDAP Authentication
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'IP of server';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dn of our environment';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'dn of service account';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'service acct password';
#Enable Customer LDAP Authentication
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'IP of server';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dn of our environment';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'dn of service account';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'service acct password';
#Get Customer User Information
#(customer user database backend and settings)
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'IP of server',
BaseDN => 'dn of our environment',
SSCOPE => 'sub',
UserDN =>'service acct',
UserPw => 'service acct password',
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
Then following instructions scattered around the net for this, I did an apt-get install build-essential to get "make".
Next did an apt-get install ncftp since it couldn't be found
I downloaded perl-ldap from http://ldap.perl.org/
Renamed the extracted folder to "ldap" to save my fingers. Uploaded via SFTP to /var/data/otrs
Back at the SSH, I ran perl Makefile.PL, and pretty much just followed the prompts doing the manual config. At the end I got the following:
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
So this new setup now can't even connect to LDAP, which is worse off than the last version. My brain hurts now.
*****UPDATE*******
I'm a tard. I got LDAP working for customers, I was trying to search users instead of customer users...is it the weekend yet?
IMAP/ SMTP Setup
I hope to have time to verify and address your OTRS issues today. You may take a look at the newer release 1.1.1 that we released yesterday. I imagine it will have the same issue however. I will get back to you.
Austin
Any help will be truly
Any help will be truly appreciated, I banged my head on this for about 5 hours yesterday. I'll go ahead and update to the 1.1.1 today when I get in just to be sure.
a couple edits. I changed
a couple edits.
I changed the fqdn to using out outside email servername "mail.servername.com", and verified that IMAP is working by hookingup an ipaq and checking it and it worked great.
I did have to change IMAP to port 143, but other than that my settings look fine, so i'm really confused.
HAHA I'm a winner! Ok,
HAHA I'm a winner!
Ok, Working from scratch, I did the following to configure it and it worked just in case anyone else is having issues:
Start VM
Register on admin page, IP is available on the screen in the VM console.
Enable SSH
SSH into box
once logged in as admin:
sudo -i
sudo passwd root
pick a root password
apt-get install build-essential
apt-get install ncftp
change permissions on /usr/local to 755
Download perl from here
extract and rename the folder to ldap to save yourself typing later
connect to the OTRS box with SFTP, and put the ldap folder in /var/data/otrs
back at the SSH session, cd to /var/data/otrs/ldap
at the prompt: perl MakeFile.PL
Follow the prompts doing a manual config
edit /var/data/otrs/config.pm and add the following:
#Enable Agent LDAP Authentication
$Self->{'AuthModule'} = 'Kernel::System::Auth::LDAP';
$Self->{'AuthModule::LDAP::Host'} = 'IP of server';
$Self->{'AuthModule::LDAP::BaseDN'} = 'dn of our domain';
$Self->{'AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'AuthModule::LDAP::SearchUserDN'} = 'dn of service account';
$Self->{'AuthModule::LDAP::SearchUserPw'} = 'service acct password';
#Enable Customer LDAP Authentication
$Self->{'Customer::AuthModule'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host'} = 'IP of server';
$Self->{'Customer::AuthModule::LDAP::BaseDN'} = 'dn of our domain';
$Self->{'Customer::AuthModule::LDAP::UID'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN'} = 'dn of service account';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw'} = 'service account password';
#Get Customer User Information
#(customer user database backend and settings)
$Self->{CustomerUser} = {
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
Host => 'ip of server',
BaseDN => 'dn of domain',
SSCOPE => 'sub',
UserDN =>'dn of service account',
UserPw => 'service account password',
},
# customer unique id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchFields => ['sAMAccountName', 'cn', 'mail'],
CustomerUserSearchPrefix => '',
CustomerUserSearchSuffix => '*',
CustomerUserSearchListLimit => 250,
CustomerUserPostMasterSearchFields => ['mail'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
#[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
#[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
#[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
# SendmailModule
$Self->{"SendmailModule"} = "Kernel::System::Email::SMTP";
$Self->{"SendmailModule::Host"} = "mail.example.com";
$Self->{"SendmailModule::AuthUser"} = "username of helpdesk";
$Self->{"SendmailModule::AuthPassword"} = "[helpdesk password]";
and like magic it worked!!!!!!!!!! I am so happy now I think I'll go drinking :P