KMail/Preguntes més freqüents (PMF) consells i trucs

From KDE UserBase Wiki
Revision as of 13:49, 3 August 2011 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

Ja és conegut el meu problema?

Símptoma: Teniu un problema amb KDE-PIM i voleu saber si algú altre ha assenyalat i resolt el problema. Us demaneu com llegir el fitxer de la llista de correu kde-pim.

Solució: És un bon costum a practicar. Proveu l'arxiu MARC a http://lists.kde.org/?l=kdepim-users&r=1&w=2


Configuració

Desar els correus enviats a una carpeta especial

Símptoma: Voleu desar els correus a una carpeta especial. Potser esteu utilitzant un servidor IMAP i voleu desar-los al servidor, no al client.

Solució: En el KMail, escolliu Arranjament → Configura KMail → Identitats → (escolliu-ne una) → Modifica → Avançat → Carpeta per al correu enviat.


Desar els correus brossa a una carpeta especial

Símptoma: Voleu desar els correus a una carpeta especial. Potser esteu utilitzant un servidor IMAP i voleu desar-los al servidor, no al client.

Solució: En el KMail, escolliu Arranjament → Configura KMail → Comptes → Recepció → (pestanya, escolliu-ne un) → Modifica → Avançat → Carpeta de paperera.

En algunes versions necessitareu Arranjament → Configura KMail → Comptes → Recepció → (pestanya, escolliu-ne un) → Modifica → IMAP (pestanya) → Carpeta de paperera (o carpeta Wastebin, depèn de la vostra distribució).


Desar els correus encriptats com sense encriptar

Símptoma: Intercanvieu correus encriptats amb un amic, però els voleu desar sense encriptar, una vegada els obriu.

Solució: Per desar a partir d'ara els correus en format sense encriptar una vegada s'han desencriptat, afegiu això al fitxer de configuració kmailrc, a la secció [Reader]:

store-displayed-messages-unencrypted=true

Això només pot treballar amb SMIME però s'està treballant en la implementació de OpenPGP.


Filtrar el correu brossa a un servidor IMAP

Símptoma: Intenteu moure el correu llegit des d'un servidor IMAP, i us pregunteu com es produirà el filtrat del correu brossa i la seva manipulació?

Solució: La màquina que ja té el vostre correu pot convertir-se en el servidor IMAP. Haureu de configurar un servidor d'aplicacions. Dovecot és un exemple, i l'orientació de les pàgines web del projecte fan que sigui fàcil de configurar. Encara us deixa amb el problema del filtratge, té sentit fer-ho al servidor (quan s'apunta el KMail cap al servidor podreu veure les carpetes que hi heu creat). Un cop més hi ha opcions, però una de les més conegudes és procmail. Un cop més hi ha un munt d'informació a Internet sobre la manera de configurar-lo. Us ofereixen un conjunt de «receptes». Heus aquí un exemple:

:0
 * (^To|^CC|^List-ID): .*kde-linux
 ${MAILDIR}.INBOX.KDE-Lists.kde-users/

Si teniu carpetes maildir, cada recipient haurà d'acabar amb una «/». Si les vostres carpetes són mbox, simplement ometeu-la.

Si esteu utilitzant bogofilter amb KMail ja tindreu una llista de paraules. També es pot usar a nivell de servidor, de manera que no haureu de començar a entrenar-lo altra vegada. El truc està en posar-ho abans de les receptes de procmail:

:0fw
 | bogofilter -e -p
:0e { EXITCODE=75 HOST }
:0: * ^X-Bogosity: Spam, tests=bogofilter ${MAILDIR}.INBOX.a-Spam/
:0e { EXITCODE=75 HOST }
:0: * ^X-Bogosity: Unsure, tests=bogofilter ${MAILDIR}.INBOX.a-Unsure/
:0e { EXITCODE=75 HOST }

Tingueu present que ara usareu un mailbox per al correu brossa i un pels que siguin incerts. Afegeixo «a-» al nom per assegurar-me que siguin fàcilment visibles, a la part superior de la llista.

Finalment, per millorar el rendiment, executeu la següent ordre ocasionalment sobre el correu brossa i incert desat:

/usr/share/bogofilter/contrib/trainbogo.sh -c -H /home/user/Maildir /.INBOX.bogotrain_ham/cur/ -S /home/user/Maildir/.INBOX.bogotrain_spam/cur/

(No oblideu comprovar la ruta).

Aquesta no és una guia completa per fer anar un servidor, però ofereix notes sobre la seva configuració perquè funcioni com espereu en KMail.


Obtenir més espai a la pantalla en el KMail

Símptoma: Esteu utilitzant KMail en el KDE 4.2 o posterior en un portàtil, i trobeu que la nova pantalla Agregació us deixa poc espai a la pantalla.

Solució: En la versió 4.2, teniu un nou joc d'icones al costat de la barra de cerca ràpida. Les podeu utilitzar per escollir un tema i un mode d'agregació diferents. Si voleu canviar l'aspecte de manera que un correu utilitzi una sola fila en comptes de dues, aneu a -el consell diu Selecciona l'aparença visual (Tema)- i canvieu el tema a Clàssic. Si voleu desactivar l'agrupació per data, canvieu l'agregació a Llista de correu estàndard. Ara el KMail es veurà exactament igual que en versions anteriors.

En les versions 4.4 i 4.5 aquest arranjament s'ha mogut al menú principal, Visualitza → Llista de missatges → Tema i Visualitza → Llista de missatges → Agregació.


Obtenir més espai a la pantalla en el KMail -reduir la mida del tipus de lletra-

Symptom: You still lack screen space, and would prefer more visible lines at the expense of font size, but your attempts only partially work.

Solució: A Arranjament → Configura KMail → Aparença → Tipus de lletra podeu seleccionar Empra tipus de lletra personalitzats i canviar els ajustaments de cada component en la llista. És llavors quan descobriu que la llista de carpetes i el cossos del missatge utilitzen els tipus de lletra que voleu, però la llista de missatges encara té un tipus de lletra massa gran.

Now you have to look at that set of new icons at the top right, close to the search box, for - the tooltip says Select View Appearance (Theme). Choose Configure, then Appearance tab. There is a list of Content Items, and below that a mockup of column headers. Each one of those column headers needs to be clicked on, and your new Custom font set. At the end of this the message list will display in the same font as the rest of your layout.

In later versions that don't have those icons you can make the changes by right-clicking on the Message List headers, and selecting Theme -> Configure -> Appearance Tab Again, you need to work with the header of each column.


Desconfigurar els consells de carpeta al KMail

Símptoma: Esteu utilitzant KMail sota KDE 4.2 en un portàtil, i trobeu que els consells sobre les carpetes oculten massa els noms d'aquestes.

Solució: Feu clic dret a la capçalera de la Llista de carpetes i desmarqueu Visualitza els consells. En el diàleg de configuració també podeu seleccionar Quan el text estigui ocult i Mai. Quan el text estigui ocult és útil per a les carpetes que tenen noms llargs, de manera que només es mostra una part del nom. A les carpetes on pugueu veure el nom complet no apareixerà el consell.


Desconfigurar els consells de la llista de missatges al KMail

En KMail, Arranjament → Configura KMail → Aparença → Llista de missatges desmarqueu General → Mostra els consells per a les capçaleres dels missatges i dels grups.


Eliminar el color de línia altern

En Arranjament del sistema → Aparença de les aplicacions → Colors → Colors, per a cada conjunt de colors, excepte els Colors normals (que no en té), canvieu el Fons alternatiu al mateix que el de Fons normal.

Mandriva i Mageia no utilitzen el nom Arranjament del sistema. Igual que en KControl, el centre de control de KDE 3, el seu nom és «Configura l'escriptori», per distingir-lo de «Configura l'ordinador», també conegut com el Centre de control de Mandriva/Mageia (MCC). A banda d'aquest canvi de nom, el mètode és com s'ha descrit anteriorment.


Store messages from separate email accounts in separate inbox folders

For POP create folders in ~/.kde/share/apps/kmail/mail/ (copy and rename the default folder). These then appear in the drop down list in Settings --> Configure Kmail --> Accounts --> Modify --> POP Settings --> Destination Folder.

Create other folders in the same location for sent mail. These can be set in Identities --> Advanced.

Migració

Transferir el correu i l'arranjament a un altre ordinador (o a qualsevol compte d'usuari en la mateixa màquina)

Solució: Els missatges es troben normalment en ~/.kde/share/apps/kmail/. Per a instal·lacions molt antigues de KMail, els missatges també poden estar en ~/Mail. Tingueu en compte que el KMail utilitza subdirectoris ocults dins d'aquest directori, de manera que necessitareu assegurar-vos que els copieu.

Per la configuració haureu de copiar els següents fitxers:

  • ~/.kde/share/config/kmailrc,
  • ~/.kde/share/config/mailtransports, (des de KDE 4.0)
  • ~/.kde/share/config/emaildefaults i
  • ~/.kde/share/config/emailidentities .

La vostra llibreta d'adreces normalment està desada a ~/.kde/share/apps/kabc/. Les dades del calendari a ~/.kde/share/apps/korganizer.

Tingueu en compte que algunes distribucions utilitzen ~/.kde4 en comptes de ~/.kde/ per a les seves dades de configuració del KDE. En cas de dubte feu una ullada a la sortida de l'ordre kde4-config --localprefix.

Des de la versió 4.4 és possible que tingueu algunes entrades de Akonadi-controlled que també s'han de mantenir. Afegir a la llista de dalt:

  • Tot sota ~/.local/share/.
  • Tot sota ~/.config/akonadi/.
  • ~/.kde/share/config/nepomukserverrc
  • Tot sota ~/.kde/share/apps/nepomuk/ (KAddressBook desa els grups de contactes a Nepomuk).

Si utilitzeu una memòria USB com a mitjà de transport per a les vostres dades, assegureu-vos de llegir la secció «No puc copiar el correu a un dispositiu USB».


Problema: No puc copiar el correu a un dispositiu USB

Símptoma: Esteu configurant un nou ordinador i voleu transferir tot el correu. I decidiu copiar-ho tot a un dispositiu USB. La feina comença, després obteniu un missatge d'error.

No s'ha pogut copiar ............Argument no vàlid

Solució: El dispositiu USB està formatat amb (V)FAT, i per tant no podeu manejar noms de carpeta maildir (ni gestionar els permisos, que poden causar molts altres problemes). Teniu dues opcions. Ja sigui formatar la memòria USB a ext2 (tenint en compte que no es pot llegir en sistemes operatius Windows sinó hi instal·leu programari addicional) o crear un fitxer tar de tot el correu, copiar-lo i extreure'l al nou lloc.



Solució de problemes

Problema: Esteu perdent els missatges

Symptom: You are losing mail. One message in your Inbox had an empty subject line and the date 1st January 1970. When you clicked on it, it was empty. When you clicked on the next message that changes to the same state.

Solution: This happens where there is corruption in your index files. First thing then, do notclick on any more messages.

  • With the KMail 1.10 shipped with KDE 4.1 or newer, right click on the folder and select Rebuild Index (you can do the same from the Folder menu).
  • With earlier KMail versions the process is slightly more complicated. Close KMail. In Dolphin, navigate to where your mail is stored (typically in ~/.kde/share/apps/kmail/) and look for index files associated with the affected mailbox. There will be two or three, and be easy to spot. Delete them. They will be recreated when you re-start KMail. You will have lost the mails that had disappeared, but the rest of the mail should be visible again.

You have empty 'ghost-mails' in your inbox (or other folder)

Symptom: For some reason, certain messages aren't accessible in KMail. They show up in the message list window but selecting them there results in a blank message window. I can't open them or reply to them, etc.

Solution: This problem is most likely due to corrupted index files, see issue "You are losing mail" above. So just follow the advice given there.


Problem: Wrong address autocompletion

Symptom: You sent an email to a friend and mis-typed his address. Now that address keeps popping up as a suggestion, every time you try to send to the correct address. You can't find it in your addressbook.

Solution: Recent addresses are actually stored in ~/.kde/share/config/kmailrc, but rather than risk making a mistake in a manual edit, go to KMail's Settings -> Configure KMail -> Composer and you will see a button Edit Recent Addresses


Problema: No aconseguiu seguir un enllaç en un missatge

Symptom: You have set Firefox as your default browser, but when you click a URL in KMail it loads a local temporary version of the page with broken relative links.

Solution: You should add "%u" or "%U" to the Firefox executable in the settings. If that is not present KDE assumes that the application is not capable of handling remote urls (http) and hence creates a local copy first.


Problem: You get an authentication error message

Authentication support is not compiled into kio_smtp. The message will stay in the 'outbox' folder until you either fix 
the problem (e.g. a broken address) or remove the message from the 'outbox' folder.

Solution: Install the sasl-devel-package and recompile kdepimlibs. E.g. for SUSE the package is named cyrus-sasl-devel and you install it with the command

yast -i cyrus-sasl-devel

When running cmake to compile kdepimlibs, you will see:

-- The following external packages were located on your system.
 -- This installation will have the extra features provided by these packages.
 [...]
 + cyrus-sasl

This usually only affects self-build distros.


Problem: You can't find your Distribution Lists

Solution: See Special:myLanguage/KAddressBook


Your correspondents complain about your bottom-posting

Symptom: Your correspondents use mail agents that routinely top-post, and they complain that they have to scroll down to read your replies. You, on the other hand, post to mailing lists, where it is a requirement that you bottom post to maintain the natural order of reading.

Solution: Highlight the portion of your received message to which you want to reply, before hitting the Reply icon or keyboard shortcut. The composer window that opens will quote only the section that you highlighted and your correspondents will be able to see your reply without unnecessary scrolling.


Error : No és possible determinar l'estat dels recursos

Symptom: When fetching mail, you get an error message reading like:

S'ha produït un error en obtenir informació de carpeta.
 No s'ha pogut determinar l'estat del recurs
 Un intent per determinar informació quant a l'estat del recurs 
No es pot obtenir informació quant a la carpeta INBOX.customflags.
El servidor ha respost: Mailbox does not exist, or must be subscribed to.,
Mailbox no existeix, o heu d'estar subscrit.,
 com ara nom del recurs, tipus, mida, etc., no ha reeixit.
 Raó tècnica: No s'ha pogut engegar el recurs

Reason: You are using Courier IMAP as your mail server.

Solution: If you are your own mail server administrator, set up a different mail service, for example cyrus. Here is a description how to do it.


Problem: Kmail is slow

Symptom: Kmail is really slow to get your mails.

Solution: It might be that the spam tool you're using is slowing down Kmail. If you used Kmail tools menu to add a spam tool and added Spam Assassin (for example) then try another one. I noticed that bogofilter is much quicker. You'll need to remove the 1st one and add the 2nd. You'll then need to train the spam tool you just added (bogofilter): KMail Anti-Spam Tools

Symptom: You just copied your mail folders from an earlier version (see "Migration" above) and now Kmail is really slow to respond shortly after it starts up, for at least several seconds with Kontact burning 100% cpu.

Solution: Work through all your saved message folders and Mark all messages as read, from either the Folder menu or right-click on the folder in the tree view side panel.

Symptom: You experience very long delays when sending messages, and KMail is frozen while you wait.

Solution: There was a bug in the various Release Candidates for KDE SC 4.4 which caused KMail to do lengthy searches for matching addresses. Updating to the full 4.4 should cure the problem.

Symptom: When you type in the composer window, characters appear very slowly.

Possible Solutions: This is a known bug. Some have reported that disabling then re-enabling desktop effects may help. Others have reported that switching to a desktop theme, other then Oxygen, works.


KMail with other desktops or applications

Problem: KMail does not start up.

Symptom: You want to start KMail from a minimal desktop environment like fvwm2. It does not start.

Reason: You are missing the dbus functionality.

Solution: Start KMail using dbus-launch like this:

dbus-launch kmail

Tell Firefox to use KMail for mailto: addresses

Solution:

Firefox 2 - In the Firefox address bar, type
about:config

Right-click anywhere in the window and select New -> String in the first dialogue field. Type

network.protocol-handler.app.mailto

and then

kmailservice

Close Firefox

Firefox 3 - In the Firefox menu, select Edit -> Preferences, choose the Applications tab, then type
mailto
in the search box. Choose Use Other... and find /usr/bin/kmailservice

Establir Firefox com navegador per omissió

Symptom: You want to click on a link in KMail and have it opened in Firefox. At the moment, another browser is used. You want to change this.

Solution: This solution will affect all of KDE, not just KMail. Start systemsettings -> Default Applications -> Web Browser -> Open http and https URLs in the following browser -> firefox.

If you are an administrator and want to set this setting automatically for your users, it is

  • for SUSE Linux

in your user directory in .kde4/share/config/kdeglobals add the line

BrowserApplication[$e]=!firefox

under category [General]

  • for all other Linux distributions:

in your user directory in .kde/share/config/kdeglobals add the line

BrowserApplication[$e]=!firefox

under category [General] If General category doesn't exist you should add it.

You can also use the script in Tutorials/Modify_KDE_Software_Defaults


Control your Roaming profile's connection

Symptom: You set up a Roaming profile to access your home server while you are on the road, but it keeps trying to connect even when you are at home. Auto-connection is disabled in the setup screens.

Solution: Settings -> Configure KMail -> Accounts -> Receiving (tab) -> (select the account to exclude) -> Modify ->General (tab), uncheck Include in manual mail check. This will exclude the profile when you hit the download icon, but the profile will still be available from the drop-down list, making it easy to get your mail while away from home.

KMail2 Issues

KMail2 doesn't send mail

Some users find that mail does not go out, and it appears that smtp is missing, even though the Settings page looks correct. It has been reported that this is cured by opening akonadiconsole and adding Mail Dispatcher Agent.

Consells i trucs

Add a Tag to aid searching

You must first define your tags, which is done in Settings->Configure KMail->Appearance->Message Tags. Now you will find that the (right-click) context menu, under Mark Message, offers you the choice of your defined tags.

Watch threads

If you want to follow a thread, right click and choose Mark Thread -> Watch Thread.

From this point on all messages on the thread that starts in this message will be marked as Watched.

Watch your own threads:

This is useful in case you are registered to a mailing list such as [email protected] and want to filter out the threads you participate in.

Create a filter to mark all your incoming messages to a mailing list as "Watched"

To create a filter go to: Settings -> Configure Filters

  • select Match all of the following
  • Add the conditions:
    • From -> Contains -> yourmail@maildomain [1]
    • List-Id -> Contains listID [2]

[1]replace yourmail@maildomain with your outgoing mail address

[2]replace listID with a specific mailing list id e.g (<kdepim-users.kde.org>) or just a '.' to include outgoing mail to all mailing list with '.' in their id (basically all).

  • Under Filter Actions choose Mark As -> Watched.

In the Advanced tab

  • Uncheck if this filter matches, stop processing here.

so that other filters such as sorting the incoming messages from the mailing list to sub-folders would execute.

  • Place that filter before other filters that may stop the filtering process,

or simply put it first. (changing the filters order is done using the two arrows up and down, under the available filters list)

Create a search on mailing list messages

Go to the folder where your mailing list messages are stored e.g (Local Folders/KDE-PIM-USERS) and hit S key or in the menu Edit -> Find Messages.

  • Select Match all of the following[3]
  • Add the condition: Message Status -> is -> Watched
  • Give the search an informative name (Search folder name) like KDE-PIM-USERS-Watched
  • Make the search. After it is done you can close the search window.

Now whenever you start a thread or participate in one, it is Watched.

[3] Pay attention to the Include sub-folders.

Usar la traducció de correu

Símptoma: Rebeu missatges de correu en diferents idiomes i voleu traduir-los sense haver de fer un munt de copia i enganxa.

Solució: Utilitzeu un programa extern per traduir el nostre correu i que el mostri.

Implementació pas a pas

Atenció

La solució proveïda ha estat provada un nombre limitat de vegades i s'ha d'utilitzar amb precaució.


  • Requisits previs, assegureu-vos de tenir-los abans de començar
    • libtranslate
    • perl
    • El mòdul de perl «Email::MIME»
    • kmail
  • Crear un filtre de canonada
    • En KMail aneu a Arranjament → Configura els filtres...
      • creeu un nou filtre amb el nom Tradueix
      • afegiu un criteri de filtratge que sempre serà veritat (p. ex., Assumpte → No és igual → 321546543)
      • afegiu una acció de filtre Passa a través de
        ~/bin/mail_translate.pl
      • obriu la pestanya Avançat i desmarqueu-ho tot a excepció de Afegeix aquest filtre al menú Aplica filtres, també li podeu establir una drecera i una icona.
  • Ubiqueu l'script al seu lloc i configureu-lo
    • deseu el següent script en un fitxer anomenat mail_translate.pl i ubiqueu-lo al directori ~/bin.
#!/usr/bin/perl

use Email::MIME;

my $from_language = 'en';
my $to_language = 'ca';
my $translation_command = "translate ";
my $languages_pair = "-f $from_language -t $to_language";
my $line;
my $message='';

while ($line=<>)
{
    $message.=$line;
}

my $email = Email::MIME->new($message);
my @parts = $email->parts;
my $separator = `echo "translation" | $translation_command -f en -t "$to_language" -`;
chop $separator;
rec_parts ($email,@parts);

sub rec_parts
{
    my $parent = $_[0];
    my @parts = $_[1];
    for $part(@parts)
    {
	my @sub_parts = $part->parts;
	if (@sub_parts > 1)
	{
	    rec_parts ($part,@sub_parts);
	}
	my $type=$part->content_type;
	if (( $part->content_type =~ m[text/plain]gi )||( $part->content_type eq ''))
	{
	    my $body = $part->body;
	    
	    $body=~s/['"`]*//g;
	    my $translation_body=`echo "$body" | $translation_command $languages_pair -`;
	    $translation_body=~s/['"`]*//g;
	    my $msg=$body."\n\n---"."$separator"."---\n\n".$translation_body;
	    `kdialog --title "$separator" --msgbox "$msg"`;
	}
    }
}
print $email->as_string;
  • Feu l'script executable amb
    $chmod a+x ~/bin/mail_translate.pl
  • Configureu l'script per a que s'adapti a les vostres necessitats.
    • Actualment, l'script tradueix de l'anglès (en) al català (ca), és probable que requeriu un altre tipus de traducció. Per canviar la configuració mirar dins de l'script la frase «$from_language = 'en'» i «$to_language = 'ca'» i substituïu les parts «en» i «ca» amb la combinació que es requereixi, si no esteu segur, una llista completa de codis d'idioma està disponible a la llista the ISO 639-2.
    • Proves
      • abans de carregar-vos correus innocents, traduïu primer alguna cosa no us faci res perdre, cerqueu a la paperera o a la carpeta del correu brossa. Feu clic dret sobre qualsevol element traduïble Aplica el filtratge → Filtre Tradueix. Apareixerà un diàleg amb el missatge original seguit de la seva traducció.
    • Solució de problemes
      • Si l'script no funciona el podeu provar fora de KMail per delimitar el component responsable. Deseu un missatge de correu electrònic com fitxer 1.mbox i executeu a la terminal
        $~/bin/mail_translate.pl < 1.mbox > 2.mbox

Si el fitxer de sortida 2.mbox no és el mateix que 1.mbox, llavors hi ha un problema en l'script i no s'ha d'utilitzar.

Nota

Aquest script només tradueix les parts de text pla d'un missatge de correu electrònic i no les parts HTML.


Editar i desar missatges sense necessitat de canviar els paràmetres dels missatges

Get rid of that long mail trail in top-poster replies. You can edit a message and remove unwanted parts by saving it to disk (Save As), editing it separately in a text editor, and then import it again. Just delete the original. This method also works to detach encapsulated messages and keep them as separate messages.