Context. Classical T Tauri stars (CTTS) differ in their X-ray signatures from older pre-main sequence stars, e.g., weak-lined TTS (WTTS). CTTS exhibit a soft excess and deviations from the low-density coronal limit in the He-like triplets. Aims. We test whether these features correlate with either accretion or the presence of a disk by observing IM Lup, a disk-bearing object apparently in transition between CTTS and WTTS without obvious accretion. Methods. We analyse a Chandra grating spectrum and additional XMM-Newton data of IM Lup and accompanying optical spectra, some of which where taken simultaneously with the X-ray observations. We fit the X-ray emission lines and decompose the H alpha emission line into different components. Results. In X-rays, IM Lup has a bright and hot active corona, where elements with low first-ionisation potential are depleted. The He-like Ne IX triplet is in the low-density state, but because of the small number of counts in the data a high-density scenario cannot be excluded at the 90\% confidence level. In terms of all its X-ray properties, IM Lup resembles a main-sequence star, but is also compatible with CTTS signatures at the 90\% confidence level, thus we cannot decide whether the soft excess and deviations from the low-density coronal limit for the He-like triplets in CTTS are produced by accretion or only the presence of a disk. The star IM Lup is chromospherically active, which accounts for most of its emission in H alpha. Despite its low equivalent width, the complexity of the H alpha line profile is reminiscent of CTTS. We estimate the mass accretion rate to be 10(-11) M(circle dot) yr(-1).