Koozali.org: home of the SME Server

Maillog Error: maildrop[4756]: Cannot determine my username.

Offline Zen

  • ***
  • 96
  • +0/-0
Maillog Error: maildrop[4756]: Cannot determine my username.
« on: September 25, 2014, 04:23:44 PM »
Hi, after the recent update of my sme 8.1, it stopped receive any email. They are all in qmail queue and in qmail log i've this error:

Code: [Select]
delivery 145: deferral: /usr/bin/maildrop:_Cannot_determine_my_username./
This for all the users and groups. Is there a solution?

Thanks in advance,
Bye :)

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #1 on: September 25, 2014, 05:34:17 PM »
Maildrop is not a part of the core, but...in which contrib have I installed it? User-panel? Vacation?
If I remove this contrib, can i solve the problem?

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #2 on: September 25, 2014, 05:54:23 PM »
Update...
in
Code: [Select]
/home/e-smith/files/users/user01 I found some files
Code: [Select]
.mailfilter
.procmailrc
.qmail
.qmail-default
.qmail-junkmail
.vacation.msg
.mailfilter.log
.mailfilter.log.1
.mailfilter.log.2

Now, moving all this files, I started to receive again but i've lost all the qmail queue. How can i retrieve all those messages?
What is strange is that those files were not recreated as I expected.

Edit:
The files have been recreated after a qmHandle -a command.

The strange is, until the file .qmail is in the folder, i can't receive anything; only when the file .qmail is deleted or moved and after a qmHandle -a I start to receive my emails. Everytime i must repeat this procedure or i give that error.
« Last Edit: September 25, 2014, 06:36:08 PM by Zen »

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #3 on: September 25, 2014, 06:45:15 PM »
.qmail file is necessary for qmail to work
You are watching in the wrong direction..

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #4 on: September 25, 2014, 06:46:34 PM »
Any suggestion on where to watch? :)

My steps (as you can see on this log):
Code: [Select]
Sep 25 14:42:44 Updated: glibc-common-2.5-118.el5_10.3.i386
Sep 25 14:43:04 Updated: glibc-2.5-118.el5_10.3.i686
Sep 25 14:43:08 Updated: bash-3.2-33.el5.1.i386
Sep 25 14:43:11 Updated: openssl-0.9.8e-28.el5.sme.i386
Sep 25 14:43:12 Updated: php-common-5.3.3-15.el5.sme.i386
Sep 25 14:43:13 Updated: php-cli-5.3.3-15.el5.sme.i386
Sep 25 14:43:13 Updated: php-pdo-5.3.3-15.el5.sme.i386
Sep 25 14:43:14 Updated: php-5.3.3-15.el5.sme.i386
Sep 25 14:43:15 Updated: php-mbstring-5.3.3-15.el5.sme.i386
Sep 25 14:43:20 Updated: php-devel-5.3.3-15.el5.sme.i386
Sep 25 14:43:21 Updated: php-xml-5.3.3-15.el5.sme.i386
Sep 25 14:43:21 Updated: php-gd-5.3.3-15.el5.sme.i386
Sep 25 14:43:22 Updated: php-imap-5.3.3-15.el5.sme.i386
Sep 25 14:43:22 Updated: php-ldap-5.3.3-15.el5.sme.i386
Sep 25 14:43:24 Updated: nscd-2.5-118.el5_10.3.i386
Sep 25 14:43:29 Updated: 7:squid-2.6.STABLE21-7.el5_10.i386
Sep 25 14:43:29 Updated: php-mysql-5.3.3-15.el5.sme.i386
Sep 25 14:44:00 Installed: kernel-PAE-2.6.18-371.12.1.el5.i686
Sep 25 14:44:00 Updated: procmail-3.22-17.1.2.el5_10.i386
Sep 25 14:44:30 Installed: kernel-2.6.18-371.12.1.el5.i686
Sep 25 16:30:48 Installed: giflib-4.1.3-7.3.3.el5.i386
Sep 25 16:30:48 Installed: giflib-utils-4.1.3-7.3.3.el5.i386
Sep 25 16:30:48 Erased: libungif-progs
Sep 25 16:30:49 Erased: libungif
Sep 25 16:32:29 Erased: maildrop [b]<---- my mistake in panic [/b]
Sep 25 16:51:35 Updated: smeserver-mailsorting-1.2-45.el5.sme.noarch
Sep 25 17:04:12 Installed: maildrop-2.5.0-13.el5.i386
Sep 25 17:28:44 Updated: smeserver-userpanel-0.9-16.el5.sme.noarch

removing maildrop, obviously qmail said:
Code: [Select]
2014-09-25 16:33:40.423076500 delivery 257: deferral: /bin/sh:_/usr/bin/maildrop:_No_such_file_or_directory/After reinstalling maildrop, qmail returned the previous message:
Code: [Select]
delivery 145: deferral: /usr/bin/maildrop:_Cannot_determine_my_username./Removing all the .qmail files and forcing qmail to send the queue, all seems working, but, when the .qmail file reappears, i must delete it again...but, now seems not always, for example, one minute ago i received an email without doing nothing.

I don't know where can I watch to solve this problem :(
« Last Edit: September 25, 2014, 06:58:29 PM by Zen »

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #5 on: September 25, 2014, 06:56:00 PM »
First of all remove maildrop or, if possible, disable it

Then, start studying SME's template concepts (here and in the developers' manual)

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #6 on: September 25, 2014, 06:59:22 PM »
Did it, but without success.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #7 on: September 25, 2014, 07:03:19 PM »
Please describe exactly what you did and how

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #8 on: September 25, 2014, 07:16:47 PM »
From web panel i launched an update using the button:

Code: [Select]
14:42:44 Updated: glibc-common-2.5-118.el5_10.3.i386
Sep 25 14:43:04 Updated: glibc-2.5-118.el5_10.3.i686
Sep 25 14:43:08 Updated: bash-3.2-33.el5.1.i386
Sep 25 14:43:11 Updated: openssl-0.9.8e-28.el5.sme.i386
Sep 25 14:43:12 Updated: php-common-5.3.3-15.el5.sme.i386
Sep 25 14:43:13 Updated: php-cli-5.3.3-15.el5.sme.i386
Sep 25 14:43:13 Updated: php-pdo-5.3.3-15.el5.sme.i386
Sep 25 14:43:14 Updated: php-5.3.3-15.el5.sme.i386
Sep 25 14:43:15 Updated: php-mbstring-5.3.3-15.el5.sme.i386
Sep 25 14:43:20 Updated: php-devel-5.3.3-15.el5.sme.i386
Sep 25 14:43:21 Updated: php-xml-5.3.3-15.el5.sme.i386
Sep 25 14:43:21 Updated: php-gd-5.3.3-15.el5.sme.i386
Sep 25 14:43:22 Updated: php-imap-5.3.3-15.el5.sme.i386
Sep 25 14:43:22 Updated: php-ldap-5.3.3-15.el5.sme.i386
Sep 25 14:43:24 Updated: nscd-2.5-118.el5_10.3.i386
Sep 25 14:43:29 Updated: 7:squid-2.6.STABLE21-7.el5_10.i386
Sep 25 14:43:29 Updated: php-mysql-5.3.3-15.el5.sme.i386
Sep 25 14:44:00 Installed: kernel-PAE-2.6.18-371.12.1.el5.i686
Sep 25 14:44:00 Updated: procmail-3.22-17.1.2.el5_10.i386
Sep 25 14:44:30 Installed: kernel-2.6.18-371.12.1.el5.i686
Then i tried to remove maildrop, always from webpanel, pressing the button "Remove additional software".
After this i tried to re-install mailsorting, cause i thought that it would have installed maildrop, but it did not.
So i open a console session and i wrote:
Code: [Select]
yum install maildrop --enablerepo=smecontribs(after every single operation i gave the
Code: [Select]
signal-event post-upgrade; signal-event restart)
After this i tried to reinstall also userpanel (cause i think that one of these operation could "reset" my server to a functionally state).
The last passage was
Code: [Select]
yum --enablerepo=smecontribs install smeserver-userpanel.
After i used MC and tried to remove my .qmail file and the other files in my folder (because some time ago i solved in this way another problem)...and seems it works, for a little, until .qmail isn't recreated.

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #9 on: September 25, 2014, 07:20:35 PM »
Ah, i have also verify the file and folders permissions and seem all ok.

This is my .qmail file:
Code: [Select]
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------


| condredirect alberto-junkmail headermatch 'X-Spam-Status: Yes'


# Forward not set
# Vacation Message not set
| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;
./Maildir/


« Last Edit: September 25, 2014, 07:23:43 PM by Zen »

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #10 on: September 25, 2014, 07:29:42 PM »
i verified my other (not updated) server, and my qmail file is different.
Code: [Select]
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------


| condredirect alberto-junkmail headermatch 'X-Spam-Status: Yes'
# Forward not set
./Maildir/


removed this line
Code: [Select]
| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;again seem it works...

(i know isn't the right way to precede, because is "a tentoni" but...now my priority is to solve this problem :( )

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #11 on: September 25, 2014, 07:32:32 PM »
You may have a custom template fragment doing bad things.  Try this:

# ls -alhF /etc/e-smith/templates-user-custom/.qmail

If anything is in there, what are the contents of those files?

I'm not sure I agree about maildrop not being part of the standard distro--the RPM is part of the ISO.  Don't know if it's installed by default, though it is installed in my SME 8.1 VM, and I don't recall customizing it at all.
« Last Edit: September 25, 2014, 07:38:07 PM by DanB35 »
......

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #12 on: September 25, 2014, 07:37:18 PM »
Code: [Select]
[root@server ~]# ls -alhF /etc/e-smith/templates-user-custom/.qmail     
ls: /etc/e-smith/templates-user-custom/.qmail: No such file or directory
[root@server ~]#

Offline DanB35

  • ****
  • 764
  • +0/-0
    • http://www.familybrown.org
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #13 on: September 25, 2014, 07:40:31 PM »
OK, how about this:

# grep maildrop /etc/e-smith/templates-user/.qmail/*
......

Offline Zen

  • ***
  • 96
  • +0/-0
Re: Maillog Error: maildrop[4756]: Cannot determine my username.
« Reply #14 on: September 25, 2014, 07:43:59 PM »
Code: [Select]
[root@server users]# grep maildrop /etc/e-smith/templates-user/.qmail/*
/etc/e-smith/templates-user/.qmail/50Filter:      return '| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;'
/etc/e-smith/templates-user/.qmail/50Filter:        if ($qmail{FilterType} eq 'maildrop' );
/etc/e-smith/templates-user/.qmail/76Filter:      return '| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;'
/etc/e-smith/templates-user/.qmail/76Filter:        if ($qmail{FilterType} eq 'maildrop' );
[root@server users]#

uhm...that line
Code: [Select]
| /usr/bin/maildrop ; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi; is the same that is in "/home/e-smith/files/users/alberto/.qmail" that i don't have in my other clean server.